Commit graph

106 commits

Author SHA1 Message Date
Jozufozu
6fc8d8dcdb Merge branch '1.20.1/dev' into 1.21.1/dev
# Conflicts:
#	neoforge/build.gradle.kts
#	vanillinNeoForge/build.gradle.kts
2025-01-21 17:26:30 -06:00
Jozufozu
10d3923bf5 Tragedy of the commons
- Publish common vanillin artifacts
- Extend JarTaskSet publish to accept an action
2025-01-18 15:00:33 -06:00
Jozufozu
99d976fb59 Uncharted: At wit's end
- Need to publish un-remapped sources for forge/mojmap based projects
2025-01-18 14:36:56 -06:00
IThundxr
09088569be
misc fixes 2025-01-17 19:50:29 -05:00
IThundxr
402cc4d2e3
Merge remote-tracking branch 'upstream/1.20.1/dev' into feat/multi-loader-1.21 2025-01-17 19:46:01 -05:00
Jozufozu
045b065166 I do declare
- Move source set bundling/common source set sharing logic into
  transitiveSourceSets and make it more flexible
- Remove commonProject field from platform extension
2025-01-12 19:03:32 -08:00
Jozufozu
0dc8f97b73 String theory
- Assume group/version are behind properties in subproject.init
- Force each subproject to manually specify their base archive name
- Don't generate mod/api artifact ids, just write them out by hand
- Remove DependentProject
2025-01-12 16:08:38 -08:00
Jozufozu
b6124be28a Scratch that
- Loom gets angry when a mod* dependency doesn't immediately exist so
  use a regular runtime dependency with the devlibs jar
- Strangely, the include dependency is just fine with the remap jar
- Move outgoing remapJar/jar configuration generation to JarTaskSet
- Don't actually need evaluationDependsOn
- Fix test mod id
2025-01-12 15:34:33 -08:00
Jozufozu
b541c19785 See yourself out
- Replace outgoing jars by directly consuming classes/resources from
  common
- Add vanillin logo
- Move subproject plugin logic to an extension so it can be configured
- Rename "mod_" properties to "flywheel_"
2025-01-12 14:04:21 -08:00
Jozufozu
6bea04ffee No need to get spicy
- Move common vanillin stuffs to a "vanillin" sourceset
- Add vanillinForge and vanillinFabric subprojects
- Mostly do gradling from scratch
- Export remap jars from platform projects to `include` in vanillin
  projects
2025-01-12 13:02:50 -08:00
IThundxr
849a095e12
Merge remote-tracking branch 'upstream/1.20.1/dev' into feat/multi-loader-1.21
# Conflicts:
#	neoforge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
#	neoforge/src/main/java/dev/engine_room/flywheel/impl/NeoForgeFlwConfig.java
2025-01-05 14:48:01 -05:00
Jozufozu
a89756a709 Nobody Else Shall Wonder
- Allow materials to specify the cardinal lighting mode
- Hard-code the cardinal lighting mode to be one of 3
  - Off
  - Chunk
  - Entity (default)
- This gives artists some control over how they want their models to
  appear in-game. Kryppers in particular noticed lighting discrepancies
  between a flywheel model and a block model
- Remove "useLightDirections" config, command, and uniform
- Remove "diffuse" flag from Material
2025-01-05 11:19:06 -08:00
IThundxr
14a6447806
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	common/src/lib/java/dev/engine_room/flywheel/lib/internal/FlwLibXplat.java
#	common/src/lib/java/dev/engine_room/flywheel/lib/model/ModelUtil.java
#	common/src/lib/java/dev/engine_room/flywheel/lib/model/Models.java
#	fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/FabricBakedModelBuilder.java
#	fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/FabricBlockModelBuilder.java
#	fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/FabricMultiBlockModelBuilder.java
#	fabric/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
#	forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBakedModelBuilder.java
#	forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeBlockModelBuilder.java
#	forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/ForgeMultiBlockModelBuilder.java
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlywheelForge.java
#	neoforge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/BakedModelBufferer.java
#	neoforge/src/main/java/dev/engine_room/flywheel/impl/FlwLibXplatImpl.java
2024-12-27 11:24:29 -05:00
Jozufozu
e57702f742 Chronically inline
- Replace ModelUtil.VANILLA_RENDERER with the actual vanilla renderer
- Inline it and remove the static field
- Remove the BlockRenderDispatcher parameter from all BakedModelBufferer
  functions
- Remove FlwLibLink#createVanillaBlockRenderDispatcher
2024-12-24 20:37:42 -08:00
Jozufozu
ddcc96e52a Cover me!
- Switch ResourceReloadCache to RendererReloadCache
2024-12-24 16:44:29 -08:00
IThundxr
9f37effbb1
Update fabric.mod.json 2024-12-13 06:38:38 -05:00
PepperCode1
2697fc11d3 Inline platform-specific model builders 2024-12-08 12:15:52 -08:00
IThundxr
db9e1b753a
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21 2024-12-08 10:55:55 -05:00
Jozufozu
0c195fef9f Manual light updates
- Update the BakedModelBufferers to default to zero sky light
2024-12-02 17:45:19 -08:00
IThundxr
eb1c56e9ac
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21 2024-11-16 13:44:29 -05:00
Jozufozu
3811da166c Wait a minute
- Add debug flag to disable frame/tick plan execution
- Should help debugging cases where a visual constructor produces a
  visual in an invalid state like the weeping shulker bug
2024-11-15 18:18:44 -08:00
IThundxr
89d87555e6
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21 2024-11-13 16:30:36 -05:00
PepperCode1
ac544245b3 Deferred default
- BackendManager.defaultBackend now dynamically computes the result every time it is invoked
- Forge backend config value now uses a supplier to provide the default backend
- Fix Fabric backend config being saved to "flw_backends" but loaded from "flw_backend"
2024-11-12 22:52:38 -08:00
IThundxr
c95bd4c722
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	forge/src/main/java/dev/engine_room/flywheel/impl/FlwCommands.java
2024-11-12 20:00:34 -05:00
IThundxr
fd786b0ad7
Merge remote-tracking branch 'upstream/1.20/dev' into feat/multi-loader-1.21
# Conflicts:
#	.github/workflows/build.yml
#	forge/src/main/resources/META-INF/neoforge.mods.toml
2024-11-12 19:53:13 -05:00
Jozufozu
cfcb4246af Effective debugging
- Add light storage debug view courtesy of effect visuals
- Yellow boxes are filled in sections
- Red/green/blue bars represent the LUT
- Cyan boxes are the "wasted space" in the LUT. Freely representable
  sections that are simply not filled in
2024-11-12 13:33:30 -08:00
PepperCode1
69f4899ac6 VertexConsumer-related clean up
- Clean up VertexWriter to closer match BufferBuilder
- Clean up MeshEmitter on Fabric/NeoForge and remove BufferBuilderAccessor
- Remove model data and model data lookup parameters in NeoForge model builders; use IBlockGetterExtension#getModelData instead
- Fix artifact Minecraft version
2024-11-04 13:16:08 -08:00
IThundxr
461578ec0e
Automated testing (#269)
* Automated testing

* Testing testing

- Use 2 spaces for indents yaml
- Move setupTestMod to PlatformExtension
- Allow specifying the sourceSet for the testMod artifact
- Rename things to camelCase
- Use rootCompile from transitiveSourceSets for the testMod source sets
- Use a blanket remapTestModJar task in the gh actions build

* Fail slowly

- We want to know the results of both tests regardless

* Add workflow dispatch

* Shoes should be steel toed, dangerous stuff

* Update build.yml

* fix modid

* Update FlywheelTestModClient.java

* add debug logging

* fix syntax issues

* fix issues

* Update build.yml

* Add debug logging

* more logging

* get testmod from correct dir

* switch to env var

* Why wait?

- Immediately audit on client tick

* DidObfuscate

- Fix RenderSystemMixin on fabric
- setShaderFogShape's arguments need to be remapped, but the name of the
  function should not be. Fortunately mixin allows matching by function
  name alone

* Clever commit title

- Change the Fabric mod ID to match Forge
- Move "Flywheel Test Mod" to static
- Cleanup start/stop messages
- Use the client start event on Fabric

---------

Co-authored-by: Jozufozu <jozsefaug@gmail.com>
2024-11-03 17:57:47 -08:00
IThundxr
ad2f3c860b
Stubborn stubs
- Remove Stub SourceSet
2024-11-03 15:02:26 -05:00
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
aeb9781bd4
Remove unused check 2024-10-12 17:28:24 -04:00
IThundxr
e39554e477
fix breaks formatting 2024-10-12 15:50:10 -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
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