Commit graph

66 commits

Author SHA1 Message Date
PepperCode1
c80601bbf1
Finalize FRAPI 26.1 Port (#5298)
- Replace single render type with render type function and make mesh nullable in extended block model submits
- Refine contract of FabricBlockModelRenderState#setupMesh to avoid footguns
- Specify in Renderer javadoc that the renderer needs to add support for extended item submits
- Fix MutableQuadViewImpl#translate not invalidating geometry
- Fix WrapperBlockStateModel not overriding new extension methods
2026-04-02 18:53:58 +01:00
modmuss50
e037b8e3e8 Fix incorrect target in ModelManagerMixin.hookModelCollect 2026-04-01 08:57:41 +01:00
TehcJS
c7e428fd6c
26.1 port of fabric-renderer-api-v1, fabric-model-loading-api-v1 & fabric-renderer-indigo (#5212)
* begin porting

particleIcon -> particleMaterial (Material.Baked)

* refactor!: `RenderType` in `QuadView` & update `EncodingFormat`

* refactor!: `FabricMaterialBaker` :3

* fix: everything

 - add `AtlasIds` values to `QuadAtlas#getId`
 - `QuadAtlas#getTextureId` -> `#getTextureLocation`
 - miscellaneous compile errors and bugs

* fix: some style and mixinextras being mad at me

* fix!: minor issues

* fix: the `BakedQuadOutput` crisis of 2026

* refactor!: remove `ItemRenderTypeGetter`

* docs: fix `ModelModifier` `ModelBaker#sprites` -> `#materials`

* docs: `MutableQuadView` missing reference

* fix: forgot to set `itemRenderType` to null by default

* fix: set `chunkLayer` and `itemRenderType` in `#fromBakedQuad`

* fix: nullability issues in `EncodingFormat` w/ `itemRenderType`

* fix: nullability issues in `EncodingFormat` w/ `itemRenderType` pt 2

* fix: recalculate transparency instead of storing in QVs

* fix: get or find chunk layer (not item render types)

* Fix testmod and use getOrResolveItemRenderType in ItemRenderContext

* Fixes and improvements

* Some doc fixes

* style: chain `QuadEmitter` calls

* docs: prefer using this method 😇 -> use this method 😡

* docs(javadoc): omg pls build successfully thx

* Large port for 26.1-pre-1

* Uncomment mixin for BlockFeatureRenderer

* fix mixins JSON

* Fixed many compile errors in model-loading-api and renderer apis

Fixed all the compile errors in fabric-model-loading-api-v1, fixed some
in fabric-renderer-api-v1 and fabric-renderer-indigo, and fixed most of
the code style problems. There is still work to do on the rendering
stuff, mainly because of the block rendering changes.

* fix: use BlockState random in SimpleBlockRenderContext#bufferModel

* general changes and add FabricBlockFeatureRenderer

* refactor: fix some mixins, some new stuff

* fix: use seed 42 in simple block contexts

* feat: mesh thingy in `BlockModelRenderState`

* Work

* Work II

* Remove QuadConsumers.ValidateAtlasUsage and promote one TODO to FIXME

* fix: crash when mannequin is present

* docs: some docs, I guess

* fix: apply mixin suggestions

* feat: `QuadView#animated`

Co-authored-by: Kilip1000 <206253641+Kilip1000@users.noreply.github.com>

* chore: docs

Added documentation to the ExtraLightCoordsUtil class.
Concerns include:
Someone not understanding what "packed " block- and skylight is.

* chore: fix checkstyle

* Docs

* chore: improve javadoc readability

* Remove all helpers that used BakedQuad.MaterialInfo

- MaterialInfo should not be used by FRAPI users as it is inefficient and unnecessary to work with in FRAPI's framework
- Remove MutableQuadView#materialInfo and add #postMaterialBake
- Revert lightmap contract on MutableQuadView#fromBakedQuad
- Fix QuadView#toBakedQuad recomputing some values instead of using existing ones
- Fix MeshQuadCollection flag computation not checking for guaranteed foil
- Update documentation and TODO comments

* Add extended variants of BlockStateModel material flag methods

---------

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
Co-authored-by: BluSpring <bluspringindohq@gmail.com>
Co-authored-by: Rigner <loic.frassemathon@gmail.com>
Co-authored-by: Kilip1000 <206253641+Kilip1000@users.noreply.github.com>
2026-03-31 14:34:34 +01:00
modmuss
c82f046115
Mixin cleanup part 2 (#5160)
* Use local variable names for all mixin locals

* Add checkstyle rule + more fixes

* More fixes

* Renames

* Cleanup

* Prevent using name for args only locals

---------

Co-authored-by: joe <burtonjae@hotmail.co.uk>
2026-01-29 13:58:45 +00:00
modmuss
11a26f3131
Migrate to classtweaker (#5153)
* move to classtweaker

* interface injection via classtweaker

* More renames
2026-01-23 22:00:31 +00:00
modmuss
3e4d8282ad
Mixin Cleanup (Part 1) (#5145)
* Fix all ambiguous mixin references

* Fix all invalid shadow accesses

* Fix all incorrect usages of shift

* Add all missing field opcodes

* Remove unused cancellable = true

* Remove another unnecessary shift

---------

Co-authored-by: joe <burtonjae@hotmail.co.uk>
2026-01-20 16:08:41 +00:00
modmuss50
9f78a5a8a3 Update Fabric Loader 2026-01-17 16:36:52 +00:00
PepperCode1
4cbb866cf7
Fix FRAPI package structure to include "client" (#5139)
- Move SpriteFinder from model to sprite package
- Remove deprecated methods in SpriteFinder
2026-01-17 10:19:27 +00:00
modmuss
6907b0084c
Enable and fix javadoc lint (#5113)
* Enable and fix javadoc lint

Also enables syntax highlighting.

* <p><strong> -> <h4>
2026-01-05 13:44:30 +00:00
modmuss
574290ba36
Rename APIs to match Mojang's naming (#5060)
* Change include in settings.gradle from 'fabric-screen-handler-api-v1' to 'fabric-menu-api-v1'

* Rename fabric-screen-handler-api-v1 directory to fabric-menu-api-v1

* Rename fabric-screen-handler-api-v1-version to fabric-menu-api-v1-version in gradle.properties
(not sure about this one)

* Rename java packages from screenhandler to menu

* Rename some resource files and references

* Rename id, name and description in fabric.mod.json

* Rename missing directories in the test mod

* Rename id, name in the test mod fabric.mod.json, and fix the entrypoints and "depends" section

* Rename and change the rest

* networking-api-v1 renames (#5058)

* api renames, by apple502j (#5057)

* reg sync

* resource loader

* api lookup api

* biome api

* Creative Mode Tab API renames (#5059)

* creative mode tab api

Checkstyle

rename buttons

* remove provides

* small change

* rename: fabric-sound-api-v1

* item api

* Update CustomDamageTest.java

* Update settings in testmod

* api renames in serialization api v1

* block api

* fix renames

* remove TODOs

* tag api

* rename package and add todo

* lifecycle-events-v1 renames

* rename syncId to containerId

* Key Mapping API renames

* Fix mixin config

* Fix build

* Fix build again...

* renames in command-api v2

* chore: fix some issues

* Update EquipmentSlotProvider.java

* chore: fixup javadoc

* chore: update some tests’ params

* more renames

* game test

* screen api

* fabric-crash-report-info-v1

- Does not seem to need anything else renamed.

* fabric-message-api-v1 - commit.1

- ClientReceiveMessageEvents -> ClientLogChatMessageEvents

* fabric-message-api-v1 - commit.2

- Patch files previously dependent on ClientReceiveMessageEvents.

* rename rendering-fluids and transfer-api

* run spotlessApply

* where this line comes from?

* fabric-message-api-v1 - commit.3

ClientSendMessageEvents -> ClientHandleChatInputEvents

* Fix build

* fabric-message-api-v1 - commit.4

- Patched ChatListenerMixin.
- Done with client renaming.

* fabric-message-api-v1 - commit.5 - done.

- ServerMessageEvents -> ServerChatEvents
- ServerMessageDecoratorEvents -> ServerChatDecoratorEvents
- Patched Mixins.
- Patched testmod.
- Finalized renaming of fabric-message-api-v1.

* Rename game rule api

* fix import order issue

* client-gametest-api-v1 renames

* Entity Events API renames

* Events Interaction API renames

* Rename module to Creative Tab API

* content-registries-v0 renames

* renames to loot

* Mapped a bit

(Should've committed more frequently, oops)

* A bit more

* refactor!(rendering-v1): update API names

* fix: checkstyle issues

* refactor(rendering-v1)!: `AtlasSourceRegistry` -> `SpriteSourceRegistry`

* refactor(object-builder-api-v1)!: api renames

* fix: checkstyle

* refactor(rendering-v1)!: `ColorProviderRegistry` -> `BlockColorRegistry`

* refactor(particles-v1)!: api renames

* refactor(particles-v1)!: `ExtendedBlockStateParticleEffectSyncClient` -> `ExtendedBlockParticleOptionSyncClient`

* fix: checkstyle lol

* Mapped some packet-related things

* Even more packets!

* client -> minecraft

* All worlds?

(I hope Intellij didn't mess up at hierarchy renaming)

* Map the last few things

Also ran the necessary gradle tasks

* refactor(data-attachment-api-v1): api renames

* refactor(data-attachment-api-v1): s2c -> clientbound, c2s -> serverbound (the superior names)

* refactor(data-attachment-api-v1): packetCodec -> streamCodec

* fix: damn checkstyle

* Update fabric-rendering-v1/src/client/java/net/fabricmc/fabric/api/client/rendering/v1/ChunkSectionLayerMap.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* refactor(rendering-v1): `BlockColorProviderRegistry` -> `ColorProviderRegistry`

* refactor(rendering-v1): `AtlasSource` -> `SpriteSource`

* refactor(rendering-v1): update names in `LevelRenderEventsTests`

* Temporary change

* S2C -> ClientBound

* Done with ModelProviderMixin (except for writer, which is a bit more complicated)

* Done with FabricAdvancementProvider, (except for writer, which is a bit more complicated)

* Rename to cachedOutput

Saw cache getting used though, so I'll change this back to cache, oopsy

* Some more cache things

* TestModClient things

* Fixed checkstyle errors?

* Improve javadoc readability

* SoundTypeBuilder done?

* Javadoc misc and registry -> holder

* Misc

* FabricCodecDataProvider renames

* FabricDynamicRegistryProvider - 1 (not done)

Maybe did something wrong. This is a quite convoluted commit.

* FabricDynamicRegistryProvider - 2 (not done)

* entries -> ressources

Is this good?

* Rename ClientBound -> Clientbound

* RegistryLookup

* registryLookup

* More of the same

* refactor(renderer-api-v1)!: api renames

* refactor(renderer-api-v1): `TextureAtlasMixinAtlas` -> `TextureAtlasMixin`

* refactor(renderer-api-v1): `blockAndTintGetter` -> `level`

* Update fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/model/ModelStateHelper.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* Update fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/render/FabricBlockRenderDispatcher.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* Update fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/render/RenderLayerHelper.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* Update fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/api/renderer/v1/render/RenderLayerHelper.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* Update fabric-renderer-api-v1/src/client/java/net/fabricmc/fabric/mixin/renderer/client/block/render/BlockFeatureRendererMixin.java

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* refactor(renderer-api-v1)!: `FabricBlockStateModel#particleSprite` -> `#particleIcon`

* refactor(renderer-api-v1)!: `ExtendedBlockStateModelSubmit` -> `ExtendedBlockModelSubmit`

* fix(renderer-api-v1): `#particleSprite` -> `#particleIcon`

* refactor(renderer-api-v1)!: `FabricBlockModelShaper#getModelParticleSprite` -> `#getModelParticleIcon`

* refactor(renderer-api-v1)!: `FabricBlockModelShaper#getModelParticleIcon` -> `#getParticleIcon`

* refactor(renderer-api-v1)!: missed api renames

* refactor(renderer-indigo): api renames

* refactor(renderer-indigo): missed renames

* Mapped a bit

(Should've committed more frequently, oops)

* Done with ModelProviderMixin (except for writer, which is a bit more complicated)

* Done with FabricAdvancementProvider, (except for writer, which is a bit more complicated)

* Rename to cachedOutput

Saw cache getting used though, so I'll change this back to cache, oopsy

* Some more cache things

* TestModClient things

* Fixed checkstyle errors?

* Improve javadoc readability

* SoundTypeBuilder done?

* Javadoc misc and registry -> holder

* Misc

* FabricCodecDataProvider renames

* FabricDynamicRegistryProvider - 1 (not done)

Maybe did something wrong. This is a quite convoluted commit.

* FabricDynamicRegistryProvider - 2 (not done)

* entries -> ressources

Is this good?

* RegistryLookup

* registryLookup

* More of the same

* Missed one

* Params

* Another mixin rename

Missed a comment

Revert

This time?

Rename?

Why doesn't rename the interface that's getting injected work?

Revert "Rename?"

This reverts commit 1a1b9814a92e9d3780fe1f274ad78effa9bcfa12.

* Revert "Another mixin rename"

This reverts commit 8986754371.

* I keep forgetting this one

* Data -> Pack

* Data -> Pack 2?

* Generators with an s, also block, not blockState

* Missed one

* I think I was a bit too bold with that one

* registry entry -> holder in javadoc

This one is debatable?

* Data -> Pack 3

* Interface injection please work?

* BlockLootTableGenerator -> BlockLootSubProvider

* Revert "Interface injection please work?"

This reverts commit 34febbcd0c.

* Data -> Pack 4

* Undo an oopsy

* These parameter names should go unchanged

Went through the git diff and undid some silliness manually

* Undid even more unnecessary changes

* I think I went to overboard with my undos, same bug as before

* Some more undos

* More undos

* Undos, also, accidentally based this branch on the wrong branch

* Undos

* I could at least change the javadoc..

* yep, undid this one too

* refactor(model-loading-api-v1)!: api renames

* Now only one thing is left

* oops, forgot mcdev

* Fix

* World -> Level

* tickCounter -> deltaTracker

* drawContext -> graphics

* Go through vibecoded script output

* Interface injections and spotless

* Text -> component

* Fix mixin config

* Rename screenshot template

* Address review

* Revert rename of PlayerInventoryStorage

* Checkstyle fixes

* Name adjustments

* CHUNK_STATUS_CHANGE -> FULL_CHUNK_STATUS_CHANGE

* ClientCommandsRegistrationCallback -> ClientCommandRegistrationCallback
getCreativeModeTabsOnPage -> getTabsOnPage
getSelectedCreativeModeTab -> getSelectedTab
setSelectedCreativeModeTab -> setSelectedTab

* Remove some old package regex hacks

* Update fabric-command-api-v2/src/client/java/net/fabricmc/fabric/api/client/command/v2/ClientCommands.java

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

* rename access to buildContext in sound api-v1 testmod

* Renames for FULL_CHUNK_STATUS_CHANGE

* Update fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/package-info.java

Co-authored-by: D. Firmansyah <deirn@bai.lol>

* Update fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/impl/transfer/item/ContainerStorageImpl.java

Co-authored-by: D. Firmansyah <deirn@bai.lol>

* Update fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/impl/transfer/item/ContainerStorageImpl.java

Co-authored-by: D. Firmansyah <deirn@bai.lol>

* Further rename Creative Tab API

* Name tweaks

* Use DataComponentHolder and TypedInstance for TransferVariant's

* HOLDER_LOOKUP_KEY -> REGISTRY_LOOKUP_KEY

* accept -> insert

---------

Co-authored-by: tenneb22 <126985099+Tenneb22@users.noreply.github.com>
Co-authored-by: Joseph Burton <burtonjae@hotmail.co.uk>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: Cassian Godsted <cassian@godsted.com>
Co-authored-by: Toffikk <slodkitofik@gmail.com>
Co-authored-by: coredex-source <samdhi2323@gmail.com>
Co-authored-by: Dimas Firmansyah <deirn@bai.lol>
Co-authored-by: CrypticVerse <crypticversemc@gmail.com>
Co-authored-by: Kilip1000 <206253641+Kilip1000@users.noreply.github.com>
Co-authored-by: sylv256 <contact@sylv.gay>
Co-authored-by: Coredex <73810221+coredex-source@users.noreply.github.com>
Co-authored-by: Kilip1000 <kilian.lennard.pro@gmail.com>
Co-authored-by: Sylv <github.9ehj1@sylv.gay>
Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
Co-authored-by: Dennis Ochulor <dennisnwanevu@gmail.com>
2025-12-31 12:00:16 +00:00
modmuss
9c919daca4
Port to: 26.1-snapshot-1 (#5050)
* 26.1-snapshot-1 Gradle setup

* Fixes (part 1)

* Fixes (part 2)

* Fixes, compiles doesnt run

* Update loader

* Some lambda fixes

* Many mixin fixes

* Simple mixin fixes

* More fixes

* Gamerule mixin fixes

* Work around likely vanilla bug breaking loot table tag loading.

* Build fixes

* Remove old deprecated modules

* Port rendering to 26.1

* Remove backwards compat tags

* Bump version
2025-12-17 13:11:12 +00:00
modmuss50
e29e459ce4 Update Fabric Loader to 0.18.2 2025-12-16 12:54:49 +00:00
modmuss50
81748cc881 Merge remote-tracking branch 'origin/1.21.11' into 1.21.11_unobfuscated
# Conflicts:
#	build.gradle
#	fabric-client-gametest-api-v1/src/client/resources/fabric.mod.json
#	fabric-gametest-api-v1/src/main/resources/fabric.mod.json
#	fabric-resource-loader-v0/build.gradle
#	fabric-resource-loader-v0/src/main/resources/fabric-resource-loader-v0.accesswidener
#	gradle.properties
2025-12-06 21:49:35 +00:00
Aurore
4fc5413f84
Fully move resource loading to Resource Loader v1. (#4981)
* Fully move resource loading to Resource Loader v1.

* Import order has fooled me.

* Remove server environment annotation on `LanguageMixin`.

* Do not use NBT for default resource pack storage and add accessibility tooltips to resource pack screen.

* Move `FabricResource` to API.

* Remove redundant test resources, fix PackEntry mixin name.

* Fix checkstyle stuff.

* Readd diamond block override texture in resource loader testmod.

* Apply suggestions from code review

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

* Fix typo in `ResourcePackActivationType`.

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2025-11-28 12:41:24 +00:00
Luracasmus
4ebb5c089d
Visually losslessly optimize compression of PNG resources (#4989)
using oxipng 9.1.5 with `-Z -o max --fast --nc -a`
2025-11-16 13:38:39 +00:00
maityyy
d642763d9f
Some javadoc fixes (#5003)
* Fix javadoc typo

* Tweak

* Oops

* Oops2
2025-11-16 13:38:05 +00:00
modmuss
36a5116592
Port to 25w45a_unobfuscated (#4990)
* Try to build with debof loom

* Remap AWs

* Game runs

* Update loom again

* Fix local build

* Update loom

* Remove prod run tasks

* AW generation fixes

* Devlibs no more

* Update loom fix res-loader testmod

* disable curseforge + modrinth publishing
2025-11-10 14:53:23 +00:00
modmuss
129f1f4c4e
Migrate to Mojang mappings (#4960)
* Auto migrate source

* Auto migrate access wideners

* Loom 1.13

* Build with mojmap

* Spotless

* Manual compile fixes

* Remapper TODO fixes

* first changes (#4961)

* Remap Entity Events (#4963)

* fabric-lifecycle-events-v1 (#4964)

* Remap Data Attachments (#4965)

* MixinAuditTest passes (#4966)

* fabric-client-gametest-api-v1 (#4967)

* Fix a bunch of invalid injector method signatures (#4968)

* rendering/api/ingido/model loader fixes (#4969)

* Fix unresolved mixin annotation target (#4970)

* small partibel api fix (#4971)

* Fix rendering testmod (#4972)

* Fix BakedModelManagerMixin

* runClientGameTest works (#4974)

* Restore AW comments and start on generated AW fixes

* Fix + run resource generation

* Disable mixin name validation + checkstyle fixes

* Remap Javadocs (#4975)

* Javadoc links

* Additional Javadocs

* A bunch of mixin fixes (#4976)

* Remap more Javadocs (#4978)

* Remap more Javadocs

* More Javadocs

* Yet more javadocs

* Remapping more Javadocs

* Further renames

* Neverending Javadocs

* Remapping continues until the end of time

* Remapping will continue until morale improves

* Mojang Mappings for Javadocs

* fix checkstyle

* Rename mixin classes to match new target names.

* Fix filename casing.

---------

Co-authored-by: Drex <nicknamedrex@gmail.com>
Co-authored-by: Cassian Godsted <cassian@godsted.com>
Co-authored-by: JumperOnJava <59884606+JumperOnJava@users.noreply.github.com>
2025-11-05 17:55:15 +00:00
modmuss
bedab31e5a
Migrate to jspecify nullable annotation (#4951) 2025-10-28 22:09:18 +00:00
modmuss50
35c69dd4cd 25w43a 2025-10-21 18:43:46 +01:00
modmuss50
65ffd040c2 25w41a 2025-10-09 18:07:20 +01:00
modmuss
3ffd6ef037
PreparableModelLoadingPlugin.DataLoader gets passed a ResourceReloader.Store (#4890) 2025-09-29 18:51:04 +01:00
LambdAurora
2fa446b297
Resource Loader v1 and new resource reloader API (#4770)
* Setup Resource Loader v1 and rework resource reloaders.

* Remove useless annotations.

* Cleanup, remove useless features, use `fromSystemProperty` name.

* Adapt to new ResourceReloader shared state system, add feature flags.

* Improve documentation of SimpleResourceReloader.

* Add more comments on the logic of resource reloader ordering using the VanillaStatus flag.

* Fix resource reloader v1 test mod.

* Apply suggestions from code review

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>

* Fix `@Nullable` annotation placement in `ResourceLoaderImpl`.

* Remove all leftovers `@NotNull`, address the easy parts of the review.

* Killed IdentifiableResourceReloader, add unit test for sorting.

* Adapt TagAliasLoader correctly, long live FabricResourceReloader.

---------

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
2025-09-20 12:54:47 +01:00
modmuss
33df5e6ebe
No longer specify remap in any Mixins (#4833)
This is only used by the anntation processor,
2025-08-29 17:46:10 +01:00
modmuss50
3154c1c82d 25w35a 2025-08-26 18:52:07 +01:00
modmuss
e35f037e62
25w34b (#4821)
* 25w34b compiles

* Mixin fixes

* Disable a pair of rendering related mixins

* Bump version
2025-08-19 18:19:31 +01:00
modmuss50
d96250a9e6 25w33a 2025-08-12 17:21:08 +01:00
modmuss50
98883a83d6 25w32a 2025-08-05 15:37:10 +01:00
modmuss
d17682153e
Port to 25w31a (#4772)
* Initial work towards 25w31a

* port: fabric-resource-loader-v0 to 25w31a (#4776)

* Add convention tags to new Copper blocks/items (#4774)

* Add 25w31a convention tags

* Add axes

* port: fabric-gametest-api-v1 to 25w31a (compiles, test status unknown) (#4778)

* port: fabric-registry-sync-v0 to 25w31a (compiles, runs, test status unknown) (#4779)

* Misc build fixes + datagen runs

* More compile fixes, disable the rendering modules.

* Remove Debug HUD APIs (to be replaced) + many mixin fixes

* Port ArmorRenderer

* Fix fake player tests, and checkstyle

* Fix client test mixin

* Fix client tests

* Fix CapeFeatureRendererMixin

* Update yarn + add TAW for DebugHudEntries.register and show namespace for mod provided debug hud entries.

* Try running client tests without tracy

* Fix CapeFeatureRendererMixin again

* Port FRAPI, Indigo, and Model Loading API

Model Loading and Indigo are fully done. Some minor parts of FRAPI (and an associated class in the Model Loading testmod) are unfinished, but it's more than usable and the current API is stable.

* Disable client tests on CI for now, they pass locally.

* Bump version

---------

Co-authored-by: Xander <xander@isxander.dev>
Co-authored-by: Cassian Godsted <cassian@godsted.com>
Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
2025-07-31 11:47:07 +01:00
Joseph Burton
946bf4c302
Add overwrites.requireAnnotations to all mixin configs (#4719) 2025-06-23 18:16:44 +01:00
PepperCode1
ae8be2b8cd Finalize 1.21.5 FRAPI port and other improvements (#4650)
* Allow using sprite finder during model baking

- Allow retrieving sprite finders from ErrorCollectingSpriteGetter, SpriteLoader.StitchResult, and SpriteAtlasManager.AtlasPreparation via new interface injections
- Deprecate SpriteFinder.get in favor of interface injected method for consistency with other methods
- Ensure lazily initialization of sprite finders is completely thread safe
- Provide a default implementation for MutableQuadView/QuadEmitter.spriteBake
- Improve some documentation

* Add ModelBakeSettingsHelper

- Respect passed ModelBakeSettings in testmod custom Geometry implementations
- Add axis block state property to testmod octagonal column block and rotate model to test ModelBakeSettings application

* Make AoCalculator.vanillaFullFace work regardless of vertex order

- Use vertex map for cubic faces during enhanced light as well now that it works regardless of vertex order and is faster than using weights
- Fix typos in AoFaceData

* Finalization

- Remove Experimental annotations
- Deprecate Renderer.emitBlockModelPartQuads for removal
- Fix GeometryBakedModel.emitQuads not applying instance AO boolean
- Add RenderLayerHelper.movingDelegate/entityDelegate and use them where appropriate
- Clarify some javadoc

(cherry picked from commit 5281b90756)
2025-05-31 20:20:25 +01:00
modmuss
a00fb309eb Add custom unbaked block state model types & FAPI testmod improvements (#4562) (#4573)
* Add custom unbaked block state model types (#4562)

* Add custom unbaked block state model types

* Add documentation

* Fix composite and multipart models' createGeometryKey implementation

Arrays do not implement equals and hashCode, so use an ArrayList instead, which has the most efficient equals and hashCode implementations of any available list implementation.

* Expose composite model in API

* Fix FRAPI testmod (#4573)

* Fix FRAPI testmod

* Fix checkstyle

* Fix Mixin name

---------

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
(cherry picked from commit c982b9513f)
2025-04-20 12:53:04 +01:00
Jonathan Coates
f928ecbe42 Extra models support (#4565)
* Extra models API

The implementation of this is largely based on the 1.21.4 version,
though with much of the API inspired by NeoForge's.

The general idea is:
 - Mods create a unique ModelKey<T> for each model to register.
 - They then call addModel(...) with their model key and either a model
   path + baking function or an UnbakedExtraModel.
 - Models are then queried from the manager with getModel(ModelKey<T>):T

* Update to feedback

 - Rename ModelKey to ExtraModelKey.
 - Move SimpleExtraModel to the public API.

* Use more compatible FabricBlockModelRenderer method

* Add debug name for ExtraModelKeys

* Doc string tweaks

* Use constructor with debug name in docs

* Rename SimpleUnbakedExtraModel

---------

Co-authored-by: PepperCode1 <44146161+PepperCode1@users.noreply.github.com>
(cherry picked from commit 45c7c848ed)
2025-04-13 13:37:44 +01:00
modmuss50
9ec45cd8da 25w15a 2025-04-08 18:03:59 +01:00
modmuss
129968e9e6
Fix module validation task & related issues (#4543)
Fixes #4542
2025-03-28 18:45:46 +00:00
PepperCode1
55bce67aa4
Port FRAPI to 1.21.5 (#4488)
* Port FRAPI to 25w10a

* Ensure all vanilla code can correctly render FRAPI block models

- Add FabricBlockModelRenderer and FabricBlockRenderManager
- Add RenderLayerHelper
- Add tint cache to AbstractTerrainRenderContext
- Fix AbstractRenderContext not normalizing output normal vector
- Remove methods in ColorHelper that exist in vanilla's ColorHelper
- Update documentation

* Fix merge

* Allow block models to choose particle sprite based on world context

* Fix merge

* Remove FabricBlockStateModel.isVanillaAdapter

* Organize FRAPI mixins

* Add MeshBakedGeometry and FabricBlockModelPart.emitQuads

- Optimize SimpleBlockStateModel.emitQuads
- Fix PillarBlockStateModel TODO

* Add FabricBlockStateModel.createGeometryKey

* Fix bugs

* Item FRAPI, MeshBakedGeometry, and MeshView

* Fix merge and mixins

* Mark APIs as @ApiStatus.Experimental

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2025-03-25 09:18:59 +00:00
modmuss50
f3eb6d3bab 1.21.5-pre1 2025-03-11 18:47:58 +00:00
PepperCode1
4e7a6c5738
Update Model Loading API to 1.21.5 (#4450)
* Update Model Loading API to 25w07a

* Update Model Loading API to 25w08a

* Fix merge

* Move model wrappers to separate package

* Remove UnwrappableBlockStateModel

* Disallow ModelModifier.OnLoad from receiving or returning null models

- Move the point at which OnLoad is invoked earlier to be inline with how OnLoadBlock is invoked

* Temporarily remove extra models API

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
2025-03-06 10:29:35 +00:00
PepperCode1
19c9635598 Add UnbakedModelDeserializer (#4321)
* Add UnbakedModelDeserializer

* Document UnbakedModelDeserializer

* Allow custom model types to be optional

* Update javadoc as per suggestion

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit ae237235d8)
2025-02-09 13:26:58 +00:00
modmuss50
86c3a9f167 25w02a 2025-01-08 17:38:47 +00:00
PepperCode1
8041d50724
Fix extra models registered through ModelLoadingPlugin only loading top level (#4356)
- Adjust testmod to make test extra model have a parent that is not referenced by any other model
2025-01-07 18:29:43 +00:00
PepperCode1
8ca2ae8d08
Reintroduce BeforeBake and AfterBake model modifiers (#4320) 2024-12-24 13:24:03 +00:00
PepperCode1
7b6b22539a
Allow retrieving model loading plugins (#4269)
* Allow retrieving model loading plugins

* Convert PreparableModelLoadingPlugin.Holder to an interface
2024-12-05 20:07:08 +00:00
PepperCode1
84404cdd27
Port FRAPI to 1.21.4 and refactor (#4247)
* Port FRAPI to 1.21.4 and refactor

- Port to 1.21.4
  - Change `glint` material property type from `TriState` to new `GlintMode` enum, due to addition of vanilla `ItemRenderState.Glint` enum
  - Remove `ItemStack` and `ModelTransformationMode` parameters from `emitItemQuads` to preserve contract of `ItemRenderState`
- Apply refactors and breaking changes
  - Move `hasTransform`, `pushTransform`, and `popTransform` from `RenderContext` to `QuadEmitter` to make the system more flexible and allowing mesh builder emitters to also have transforms
  - Remove `RenderContext` and inline remaining parameters to `emit*` methods; allows outputting model to arbitrary emitter and invoking model from arbitrary location
  - Remove `RendererAccess` and add static `Renderer#get` and `#register` instead
  - Disallow `Renderer` retrieval from returning a null value
  - Change `QuadView#faceNormal` to return a `Vector3fc` instead of a `Vector3f`
  - Remove deprecated methods
- Change `MeshImpl` to use a static cursor pool to save on memory and to allow nesting access to cursor on a thread
- Remove "compatibility mode" from Indigo

* Change contract of and better document `cullTest`

This allows a model to control which quads a submodel can cull early irrespective of transforms. Forwarding the test to the submodel will make it so pushed transforms may not receive quads that will be culled. The previous behavior of pushing a transform disabling early culling can now be achieved by passing `face -> false` to the submodel.

* Further refactors

- Remove disableColorIndex material property
- Rename colorIndex methods to tintIndex in QuadView and MutableQuadView to match recent Yarn rename
- Remove ForwardingBakedModel and WrapperBakedModel
  - Vanilla's new WrapperBakedModel is similar enough to ForwardingBakedModel
  - WrapperBakedModel will be moved to Model Loading API v1 in a different PR
- Set default vertex color to 0xFFFFFFFF instead of 0
- Disallow MutableQuadView#material from accepting a null material
- Precompute default quad data buffer instead of using zeroed buffer and setting defaults every time

* Fix build

The error was caused by a classloading loop.

* Convert MeshBuilder into MutableMesh

- Effectively split MeshBuilder#build into MutableMesh#immutableCopy and #clear
- Effectively add MutableMesh#forEachMutable
- Add Mesh#size
- Remove QuadEmitter#hasTransform
- Optimize MutableQuadViewImpl#copyFrom by not precomputing geometry
- Give UnwrappableBakedModel#unwrap a default implementation to prevent issues with interface injection
- Finish porting FRAPI and Model Loading API testmods

* Finish documentation
2024-12-02 21:48:27 +00:00
PepperCode1
6a293bdb89
Update Model Loading API to 1.21.4 (#4243)
* Update Model Loading API to 1.21.4

- Split model modifier events and callbacks - one set for static models and one set for block models
  - This is necessary because static models use UnbakedModel and are baked with settings while block models use GroupableModel and are not baked with settings
  - This cleans up the Identifier/ModelIdentifier getters
  - OnLoad for block models was not added because the unbaked block model map is not a cache and block models cannot inherit from other models
- Make DelegatingUnbakedModel a record to allow accessing the delegate ID
- Remove BuiltinItemRenderer, BuiltinItemRendererRegistry, and BuiltinItemRendererRegistryImpl as they were replaced by a TAW to SpecialModelTypes.ID_MAPPER

* Add fabric_ prefix to methods in BakedModelsHooks and fix checkstyle

* Remove ModelResolver and BlockStateResolver

- The functionality of ModelResolver could be perfectly replicated with ModelModifier.OnLoad with OVERRIDE_PHASE
- The functionality of BlockStateResolver could be perfectly replicated with ModelModifier.BeforeBakeBlock with OVERRIDE_PHASE
- Fix log warning caused by half_red_sand.json not defining particle sprite

* Re-add BlockStateResolver and ModelModifier.OnLoadBlock

- BeforeBakeBlock runs too late to allow modifying how models are grouped, so OnLoadBlock is necessary to allow that
- OnLoadBlock only runs for models which were actually loaded from blockstate files, so BlockStateResolver is necessary to allow adding models for blocks without a corresponding blockstate file
- Add UnwrappableBakedModel
  - Moved and renamed from FRAPI's WrapperBakedModel (original will be deleted in separate PR)
  - Implement it and interface inject it on vanilla's WrapperBakedModel
  - Add new static UnwrappableBakedModel#unwrap method which accepts a Predicate saying when to stop unwrapping
- Add WrapperUnbakedModel which simply delegates all method calls to a different UnbakedModel

* Remove ModelModifier.*Bake*

- Remove BeforeBake, AfterBake, BeforeBakeBlock, AfterBakeBlock
- Remove DelegatingUnbakedModel
- Add WrapperGroupableModel
- Add documentation and extra constructor to WrapperUnbakedModel

* Clarify OnLoad doc about meaning of null model
2024-11-30 18:18:10 +00:00
haykam821
7feeb733ad
Update mod to Minecraft snapshot 24w44a (#4197)
* Update mod to Minecraft snapshot 24w44a

* Bump version

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-10-30 18:44:56 +00:00
modmuss
fd37071f8b
Update Loom and Loader (#4188) 2024-10-27 09:44:05 +00:00
modmuss50
c47b9d4307 Update Fabric Loader 2024-10-15 15:12:08 +01:00
modmuss50
9ed063b333 24w37a 2024-09-11 17:28:45 +01:00
modmuss
d48ec150ba
24w36a (#4068)
* 24w36a

* Some fixes

* More work

* Fixes

* Update yarn

* Update fabric loader

* Bump versions
2024-09-05 11:42:30 +01:00