Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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
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
PepperCode1
29b8c3b00f Fabric client commands 2024-05-17 08:43:56 -07:00
Kneelawk
90321be90d Fix RenderStageCallback 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
PepperCode1
989728ca58 Most of Fabric
- 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
2024-05-17 08:43:56 -07:00
PepperCode1
3ccb4eb9a1 Minor clean up and fixes 2024-05-17 08:43:56 -07:00
Jozufozu
8d4fe7722c Gradle grumbles
- 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
2024-05-17 08:43:56 -07:00
Jozufozu
ff0a928479 Everything but models
- 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
2024-05-17 08:43:56 -07:00
Jozufozu
e152df6769 Platform dependent wheeling
- Use ClientPlatform to:
  - Dispatch events
  - Create iris/oculus handler
- Move VisualizationEventHandler into forge project
2024-05-17 08:43:56 -07:00
Jozufozu
7e5b2098b1 Deduplication and stubs
- 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
2024-05-17 08:43:56 -07:00
Kneelawk
58278dd8b4 Move events to platforms 2024-05-17 08:43:56 -07:00
Kneelawk
6e0702aa0b Move MinecraftMixin to platforms 2024-05-17 08:43:56 -07:00
Kneelawk
70a72209d2 Move Sodium mixin to platform code 2024-05-17 08:43:56 -07:00
Kneelawk
f227c44ec8 Begin on platform abstraction interface 2024-05-17 08:43:56 -07:00