Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architectury Multi-Loader Setup #236

Merged
merged 62 commits into from
May 17, 2024

Conversation

Kneelawk
Copy link
Contributor

This PR

This PR merges the Flywheel Fabric and Forge branches into a single branch, using an Architectury-based multi-project setup.

@Jozufozu
Copy link
Member

Is the jsr dependency necessary for other dependencies? We use jetbrains annotations for all immediate flywheel stuff

@Kneelawk
Copy link
Contributor Author

Is the jsr dependency necessary for other dependencies? We use jetbrains annotations for all immediate flywheel stuff

The jsr is the only place I could find the javax.annotation.ParametersAreNonnullByDefault annotation generated in the package-infos, but I can look again.

Kneelawk and others added 28 commits May 4, 2024 16:56
- Move common gradle business from each subproject into the
  rootProject.subprojects closure
- Add fabric.mod.json
- Register forge mixin configs
- Make blaze3d mixins remap = false
- Separate common, forge, and fabric mod entrypoints
- Use ClientPlatform to:
  - Dispatch events
  - Create iris/oculus handler
- Move VisualizationEventHandler into forge project
- Move loom.runs into subprojects closure
- Move common code sharing into subprojects closure
- Apply java plugin
- Fix runs not being generated by moving generatePackageInfos to the
  bottom
- Trying to get xplat forge working, fabric can wait until the common
  project compiles
- Move backend manager event handling to separate class
- Move commands into forge for now
- Make FlwConfig an interface and move concrete impl into forge
- Remove event parameters from handlers than don't actually use them
- Add platform specific blockstate light emission for uniforms
- Remove example effect
- Add accessor for LevelRenderer#ticks
- Make model builders abstract
- Move BakedModelBufferer as is into forge project
- Create Forge*ModelBuilders with modeldata parameters
- Wrap ModelBuilder ctors in factory methods
- Add FlywheelLibPlatform api, similar to api.internal package but for
  lib-only/platform specific stuff
- Move TransformStack wrapping into FlywheelLibPlatform
- Create vanilla renderer through FlywheelLibPlatform
- Handle partial model initialization in separate event handler class
- Fix test configuration in common project
- Apply java, maven-publish to all projects
- Prefer the tasks.named() syntax for configuring tasks
- Separate shared configuration for platform projects into a separate
  configure block
- Add more fields to processResources
- Make helper methods static
- Exclude duplicated package infos
- Actually init vanilla visuals
- Move common build script stuff to buildSrc
- Set ideaSyncTask finalizedBy generatePackageInfos directly in
  package-infos.gradle
- Enable loom multiproject optimization, though not sure if it makes a
  difference for us yet
- Organize almost all remaining code into one of four modules
- Fix some incorrect inter-module dependencies
- Get Fabric into a working state
  - The config, client commands, and model builders are still missing and registry freezing happens too late
- 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
- 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
- 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
- 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
Jozufozu added 10 commits May 4, 2024 16:56
- Convert existing binary plugins to kotlin
- Move each plugin to a different package
- Expose desired behaviors from platform plugin via an extension
- Move PlatformPlugin to platform package
- Refine capabilities checks
- To compile with glsl 150:
  - Instancing needs ARB_shader_bit_encoding
  - Indirect needs gpu_shader5 and shading_language_420pack
- Require extensions instead of just enable, probably doesn't make a
  difference since we check for their presence first but require aligns
  with our intent better
- Compile with progressively lower glsl versions to test which are
  available.
- Properly returns 460 on my machine even with a gl version of 320
- Remove glsl enums below 150
- Port java/subproject convention plugins to kotlin binary plugin
- Fix licence bundling in jars
- Update licence year
- Port to kotlin gradle
- Use cool kotlin dsl extension methods in plugins where possible
- Address warnings generated by javadocs and mixin remaps for joml
- 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
- 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
- Use immutable lists for backend extensions
- Copy the contents of indirect base extensions into compute extensions
- Move uniform block binding to Uniforms class and make magic strings
  static final
- Add rudimentary JSON parsing to load a config on fabric
- Save the config file after a config command changes
- Catch exception from GlCapabilities to detect vulkanmod and similar
- Remove changelog.txt
- Remove old gradle properties
- Update readme but nothing comprehensive
@Jozufozu Jozufozu marked this pull request as ready for review May 11, 2024 23:39
Copy link
Member

@Jozufozu Jozufozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems good to me

@Jozufozu Jozufozu requested a review from PepperCode1 May 11, 2024 23:57
@Kneelawk Kneelawk requested a review from Jozufozu May 12, 2024 08:50
Kneelawk and others added 3 commits May 12, 2024 02:48
- 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
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.
Copy link
Member

@Jozufozu Jozufozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some unused Gradle tasks to clean up but I think this should merge to unblock more crucial tasks.

@Jozufozu Jozufozu merged commit 7ef9ce3 into Engine-Room:1.20/dev May 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants