Commit Graph

66 Commits

Author SHA1 Message Date
IThundxr
6cc2b74eef
Fix iris compat 2024-10-06 13:28:43 -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
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
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
c32fccc133
Sodium 0.6 2024-08-22 19:41:28 -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
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
10d032c53e
1.21 Port IV 2024-07-10 13:03:07 -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
349e7b3cb3
fix mixin 2024-06-07 16:24:52 -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
Jozufozu
a69389c175 Ctrl Shift R
- Bulk replace com.jozufozu.flywheel with dev.engine_room.flywheel
- Optimize imports
2024-05-25 12:08:50 -07:00
Jozufozu
6e710049a5 Moving house
- Move all files without touching package names in-code
2024-05-25 12:08:01 -07:00
Jozufozu
1e81903494 Now you have been promoted
- Move VisualizationHelper into lib
2024-05-20 20:59:20 -07:00
PepperCode1
7ef9ce3907 Fix mesh order of models from model builders
Meshes are now always sorted by chunk layer first, then in order of how the BakedModel returned quads. This should exactly match vanilla's chunk buffering and avoid any rendering issues.
2024-05-17 08:43:56 -07:00
PepperCode1
914ce0a7de Fix registry freeze timing
- Move registry freezing to right before start of initial resource reload
- Also warn if Fabric config JSON is not an object
- Move Flywheel.java to API
- Remove Flywheel.LOGGER and others; add impl-specific and backend-specific loggers
- Remove unused mixins
- Organize imports
2024-05-17 08:43:56 -07:00
Kneelawk
6dff488f8c Use better method for telling loom to remap api artifacts
This reverts commit c5a6fe98c2.
2024-05-17 08:43:56 -07:00
Kneelawk
9c0f0e94f7 Fix api artifacts getting remapped by consumers 2024-05-17 08:43:56 -07:00
Jozufozu
b95201f001 JSON Fabrication
- Add rudimentary JSON parsing to load a config on fabric
- Save the config file after a config command changes
2024-05-17 08:43:56 -07:00
Jozufozu
77833a5b01 Aven-jars assemble
- Create separate remap tasks for the common mojmap api to get loom to
  populate its manifest file
- Add helper method to fork a JarTaskSet and generate new remap tasks
- Remove non-remap publish method
- Set assemble to depend on published jar tasks again
- Add companion methods to create individual jar tasks
2024-05-17 08:43:56 -07:00
Jozufozu
4c706f23e6 Less is more
- Merge package-infos, jar-sets, and transitive-source-sets plugins
- Move publishing logic into JarTaskSet
- Do not eagerly add all jarsets to assemble
  - Significantly reduces build times
- Add separate helper method for creating outgoing jarsets
2024-05-17 08:43:56 -07:00
Jozufozu
f25d66680e Wait, it's all kotlin?
- Port to kotlin gradle
2024-05-17 08:43:56 -07:00
Jozufozu
a44e7f5205 All your script are belong to us
- Port java/subproject convention plugins to kotlin binary plugin
- Fix licence bundling in jars
- Update licence year
2024-05-17 08:43:56 -07:00
Jozufozu
15184b8ccd Declaration of jar
- Expose desired behaviors from platform plugin via an extension
- Move PlatformPlugin to platform package
2024-05-17 08:43:56 -07:00
Jozufozu
2072bea11b Caught linking
- Upgrade buildSrc to kotlin buildscript
- Add TransitiveSourceSet extension to abstract creating the different
  source sets and creating the configurations to apply dependencies
2024-05-17 08:43:56 -07:00
PepperCode1
29b8c3b00f Fabric client commands 2024-05-17 08:43:56 -07:00
Jozufozu
745ccfae10 Plugin play
- Convert package infos stuff to a proper plugin
- Add extension for specifying which source sets get generated package
  infos
- Move extension classes into their own files
- Move GeneratePackageInfosTask into com.jozufozu.gradle
2024-05-17 08:43:56 -07:00
Kneelawk
90321be90d Fix RenderStageCallback 2024-05-17 08:43:56 -07:00
Kneelawk
f15501dac8 Add common publishing 2024-05-17 08:43:56 -07:00
PepperCode1
b9490fe11a Best-effort untested Fabric model builders
- Also fix crash buffering fluids in BakedModelBufferer#bufferMultiBlock (Forge)
- The mesh order in models created by model builders is currently incorrect and will be fixed later
2024-05-17 08:43:56 -07:00
Jozufozu
9ae4065c1c Pretty groovy man
- Upgrade platform script plugin to pre-compiled groovy plugin
- It was getting really difficult to manage all the logic/plugins/types
  from the basic script, and implementing a real plugin gives us much
  better type safety and IDE access to upstream plugins
- Separate api/lib/backend/impl in platform projects
- Add platform module output to main runtime classpath so the fabric
  loader recognizes our additional modules
2024-05-17 08:43:56 -07:00
Jozufozu
e1b0cebc2c Unconventional
- Use convention plugins for common build logic
- Convention plugins get to be applied in the plugins block and can load
  other plugins
- Move GeneratePackageInfosTask to its own file in buildSrc
- Apply GeneratePackageInfosTask to every sourceSet
2024-05-17 08:43:56 -07:00
Jozufozu
82a098626b Centrifuge
- Separate common project into 4 source sets
- Declare outgoing configurations for forge/fabric to depend on
- Re-compile source from each source set in each platform's compileJava
2024-05-17 08:43:56 -07:00
Kneelawk
0a4d511042 Fix artifactIds 2024-05-17 08:43:56 -07:00