Commit graph

87 commits

Author SHA1 Message Date
IThundxr
d881ba5302
Twas a snowy night full of scripting the builds
- Post merge fixes
- Remove stubs
2024-11-01 22:08:09 -04:00
IThundxr
ad938399b4
post merge fixes 2024-10-29 17:48:20 -04:00
IThundxr
07e66bb299
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	common/src/lib/java/dev/engine_room/flywheel/lib/util/ShadersModHandler.java
#	common/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplat.java
#	common/src/main/java/dev/engine_room/flywheel/impl/compat/SodiumCompat.java
#	common/src/main/java/dev/engine_room/flywheel/impl/mixin/BlockEntityTypeMixin.java
#	fabric/build.gradle.kts
#	fabric/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/SodiumMixinPlugin.java
#	fabric/src/main/resources/fabric.mod.json
#	forge/build.gradle.kts
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
#	forge/src/main/resources/META-INF/neoforge.mods.toml
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
2024-10-29 17:38:23 -04:00
IThundxr
3d2fdb7e83
Backport changes from 1.21.1 (#265)
* Backport changes from 1.21.1

* fix

* Fix building

* fix compile error

* fix

* fix build for real

* address reviews

* Fix sodium compat

* address requested changes

* mark rubidium as incompatible

* add missed call

* Should have worn steel toe boots

- Add "stub" sourceset to each subproject
- Directly pass vararg sourcesets to methods in PlatformExtension to
  avoid automatically shipping jars with the api stubs
- We may have to include stubs in setupLoomMod, but I don't think so
- A lot of this can be stripped back out if we don't need stub sources
  for the forge/fabric subprojects

* Guarded stubs

- Add Sodium 0.6 and Iris API stubs to stubs source set and remove Gradle dependencies on local Sodium jar, Iris, and Oculus
- Ensure usage of APIs that may not exist at runtime is in private classes and access is always guarded
- Change ShadersModHandler
  - Rename to ShadersModHelper
  - Convert methods to check for Iris' and Optifine's presence into static final fields
  - Move implementation to impl source set in form of IrisCompat and OptifineCompat classes
- Rename CompatMods to CompatMod and add public field to access mod ID
- Set BlockEntityType's Sodium predicate to null after it is removed
- Update repository links
- Remove local libs repository

---------

Co-authored-by: Jozufozu <jozsefaug@gmail.com>
Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
2024-10-18 20:29:43 -07:00
IThundxr
c705fdfc6f
address requested changes 2024-10-14 18:06:34 -04:00
IThundxr
fa57f34c47
formatting changes 2024-10-14 17:53:30 -04:00
IThundxr
008b09891a
fix meshemitter 2024-10-14 17:44:55 -04:00
IThundxr
68e545bddb
forgeEventBus -> gameEventBus 2024-10-12 15:57:05 -04:00
IThundxr
dc3e264869
post to correct bus 2024-10-12 15:48:47 -04:00
IThundxr
6f946fcedc
Rename class 2024-10-12 15:45:14 -04:00
IThundxr
178dd6c44e
address review 2024-10-12 08:37:52 -04:00
IThundxr
93c116384f
Last fixes 2024-10-10 20:54:25 -04:00
IThundxr
ae4e4e79f5
post merge fixes 2024-10-05 12:59:27 -04:00
IThundxr
08866edf09
Merge branch '1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
2024-10-01 21:02:33 -04:00
Jozufozu
40577420d5 In the right direction
- Use vanilla light directions for diffuse lighting
- Copy mc's glsl code for it, but assume directions are normalized
- Add command/config to toggle use of light directions vs chunk accurate
  diffuse
- Always use shade in getItemMaterial
- Do not reload resource packs when updating light smoothness config,
  we don't need to anymore with lazy compilation
2024-09-29 11:52:35 -07:00
IThundxr
e7e3579315
Merge branch '1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	common/src/lib/java/dev/engine_room/flywheel/lib/model/part/ModelPartConverter.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
#	gradle.properties
2024-09-20 09:37:06 -04:00
PepperCode1
5b6463b8f1 Regularly scheduled maintenance
- Remove ModelHolder and ModelCache
- Remove lib/util.FlwUtil
- Remove lib/util.Pair and replace usages with com.mojang.datafixers.util.Pair
- Remove lib/util.Unit and replace usages with net.minecraft.util.Unit
- Make ResourceReloadHolder and ResourceReloadCache final and move to util
- Clean up code in backend/glsl
- Move LightSmoothnessArgument to impl
2024-09-19 20:24:58 -07:00
PepperCode1
62a0954381 Home alone
- Remove LoweringVisitor
- Move functionality of four main static methods in LoweringVisitor to new ModelTrees class
  - Return ModelTree directly
  - Accept Material instead of TextureAtlasSprite for efficiency, so visuals don't need to look up the sprite to get the ModelTree
- Use ResourceReloadCache for MeshTree.CACHE
2024-09-19 11:40:41 -07:00
Jozufozu
31b3507d62 One big happy family
- Add ModelTree
- Add LoweringVisitor to traverse a MeshTree and emit ModelTree nodes
  and Models
- Provide some default visitor creation methods
- Abstract ModelCache -> ResourceReloadCache
- Abstract ModelHolder -> ResourceReloadHolder
- Add ModelTreeCache to hide lookup cost if it gets extreme
2024-09-15 14:49:33 -07:00
PepperCode1
295ebc7573 Treefactors
- Add MeshTree and InstanceTree
- Deprecate ModelPartConverter for removal
- Refactor ChestVisual to use InstanceTree
- Combine double chest light in ChestVisual
2024-09-14 15:00:27 -07:00
IThundxr
93650111b1
fix remapping 2024-09-14 09:59:11 -04:00
IThundxr
3176f1d0f5
Fix issues 2024-09-14 09:40:33 -04:00
IThundxr
fc61ff1c98
Add sodium 0.6 compat 2024-09-14 09:20:59 -04:00
IThundxr
42290b207f
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	buildSrc/build.gradle.kts
#	buildSrc/src/main/kotlin/dev/engine_room/gradle/subproject/SubprojectPlugin.kt
#	forge/build.gradle.kts
#	gradle.properties
#	gradle/wrapper/gradle-wrapper.properties
2024-09-14 08:57:52 -04:00
Jozufozu
dfc1e3a397 Looming danger
- Bump arch loom and gradle versions
- Do not set default refmap name
- Enable legacy mixin ap in loom
- Individually add sourcesets to looms refmap stuffs
2024-09-09 21:28:02 -07:00
IThundxr
3453715f81
forge porting 2024-08-22 20:31:52 -04:00
IThundxr
0919c0f02b
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/ForgeFlwConfig.java
2024-08-22 20:30:26 -04:00
IThundxr
a932d5daa0
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
2024-08-22 20:29:53 -04:00
IThundxr
6cf9f36c0c
iris support 2024-08-22 20:28:52 -04:00
IThundxr
c32fccc133
Sodium 0.6 2024-08-22 19:41:28 -04:00
IThundxr
5313585f3e
update neoforge & fix mixins 2024-08-11 10:05:39 -04:00
Jozufozu
76a4b35ce6 Assimilate Backend Config
- Merge flywheel-backend config into an object within the base flywheel
  config
- On forge, push a path in the toml
- On fabric, serialize a nested json object
- Still expose the BackendConfig via FlwBackendXplat, but have the impl
  set a static field in the xplat impl
- Revert debug shulker box changes in previous commit
2024-08-10 12:54:15 -07:00
Jozufozu
744c40a56a Installing a light switch
- Guard 3 different flw_light impls via #define
- Guard the inner face correction behind another #define
- Add LightSmoothness enum to decide which flw_light impl to use
- Make LightSmoothness configurable via a new BackendConfig
- Add command to switch LightSmoothness on the fly
- Note: currently requires a resource reload so we don't need to compile
  4x as many shaders
2024-08-09 14:45:17 -07:00
IThundxr
44c2f78458
merge: post merge fixes & porting 2024-07-27 22:03:46 -04:00
IThundxr
5e642245b7
Merge remote-tracking branch 'refs/remotes/upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	common/src/lib/java/dev/engine_room/flywheel/lib/material/Materials.java
#	common/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshHelper.java
#	common/src/lib/java/dev/engine_room/flywheel/lib/visual/component/ShadowComponent.java
#	common/src/main/java/dev/engine_room/flywheel/impl/mixin/LevelRendererMixin.java
#	common/src/main/java/dev/engine_room/flywheel/impl/mixin/visualmanage/SectionCompilerMixin.java
#	forge/src/api/java/dev/engine_room/flywheel/api/event/BeginFrameEvent.java
#	forge/src/api/java/dev/engine_room/flywheel/api/event/RenderStageEvent.java
#	forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/PartialModelEventHandler.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwImplXplatImpl.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/mixin/sodium/ChunkBuilderMeshingTaskMixin.java
2024-07-27 21:59:46 -04:00
PepperCode1
eb2ba12a98
Formalize most public API (#253)
* Start on general API formalization

* More API improvements

- Add Engine#onLightUpdate; remove LightUpdateHolder and backend/ClientChunkCacheMixin
- Add Effect#level
- Add VisualizationHelper#queueAdd and #queueRemove for Effects
- Fix PartialModel not assigning bakedModel field when populating on init
- Fix PartialModel.ALL using weak keys instead of weak values
- Make Simple*Visualizer and corresponding inner Builder classes final
- Restore FlatLit#light overload that accepts block and sky light values separately
- Add AbstractBlockEntityVisual#relight overloads that accept Iterator and Iterable
- Reorganize classes in impl.vizualization

* TaskExecutor simplification

- Move TaskExecutor#sync* methods to TaskExecutorImpl
- Move Flag and RaisePlan to impl
- Remove TaskExecutor#scheduleForMainThread and #isMainThread methods
- Remove SyncedPlan
- Add Engine#setupRender
- Remove TaskExecutor parameters from Engine#render* methods
- Convert Engine$CrumblingBlock into an interface
- Unmark RenderContext as NonExtendable to allow fulfilling the purpose described in the doc of VisualizationManager#renderDispatcher

* Remove registry freeze callbacks

- Lazily initialize MaterialShaderIndices
- Rename MaterialShaders#*Shader to #*Source
- Move BackendImplemented to api.backend package
2024-07-26 14:21:35 -06:00
IThundxr
6533723fdf
feat(api): Make PartialModel's use RL's instead of MRL's 2024-07-15 17:36:57 -04:00
IThundxr
1cce5da673
Mixin Fixin' 2024-07-14 22:18:14 -04:00
IThundxr
e374365ce4
1.21 Port III 2024-07-10 12:51:47 -04:00
IThundxr
d0924175de
1.21 Port II 2024-07-10 11:44:52 -04:00
IThundxr
d587ec0ec8
1.21 Port I 2024-07-10 11:27:18 -04:00
IThundxr
045771dce5
fix param names 2024-06-07 16:46:30 -04:00
IThundxr
47e80a66a0
optimize imports 2024-06-07 16:15:10 -04:00
IThundxr
52d99e3a61
fix param name 2024-06-07 16:02:09 -04:00
IThundxr
4190ac72c5
fix issues here and there 2024-06-07 16:00:21 -04:00
IThundxr
68d40b9a7d
port rebase fixes 2024-06-04 15:07:49 -04:00
IThundxr
8c61f3fc1e
Obfuscated Obfuscation
- Fix ObfuscationReflectionHelper#setPrivateValue using SRG mapped names, Neoforge has switched to mojmap at runtime
2024-06-04 15:07:47 -04:00
IThundxr
56b0fce44d
Port to 1.20.4 2024-06-04 15:07:43 -04:00
PepperCode1
ee3958b140 Remove VertexViewProvider and VertexViewProvider registry 2024-05-30 17:30:39 -07:00
PepperCode1
c880cdc2a7 Fix MeshEmitter not restarting builder after emitting 2024-05-27 16:10:57 -07:00