Commit graph

27 commits

Author SHA1 Message Date
+merlan #flirora
5e56e54003 RecipeProvider: Output stonecutting recipes in result item’s namespace (#5429)
* RecipeProvider: Output stonecutting recipes in result item’s namespace

* Add data generation test in testmod
2026-06-15 10:24:15 +01:00
Kevin
8691a43302 Add String#toLowerCase/toUpperCase without locale checkstyle (#5367)
* Add String#toLowerCase/toUpperCase without locale checkstyle

* Update checkstyle.xml

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
2026-05-03 14:26:44 +01:00
modmuss
35c80edc65
General build script improvements (#5252)
* General build script improvements

* Fix?

* really fix

* Fix?
2026-03-13 15:03:19 +00: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
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
Kevin
43c963c53f
Add 'ModifyReceiver' to checkstyle rules (#5026) 2025-12-07 20:29:50 +00:00
modmuss50
b99fae92d2 Add checkstyle rule to disallow org.jetbrains.annotations.Nullable 2025-10-28 22:22:10 +00:00
modmuss
1af5c5a76a
Remove all @NotNull annotations (#4924)
* Remove all @NotNull annotations

* Missed one
2025-10-14 18:27:34 +01:00
modmuss
f6b7d89161
Add a checkstyle rule for nested code blocks (#4925) 2025-10-14 18:22:54 +01:00
Copilot
645ba9f60d Add checkstyle rule to disallow @Debug annotation usage (#4839)
* Initial plan

* Add checkstyle rule to disallow @Debug annotation usage

Co-authored-by: modmuss50 <4324090+modmuss50@users.noreply.github.com>

* Remove comment and format @Debug rule query on single line as requested

Co-authored-by: modmuss50 <4324090+modmuss50@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: modmuss50 <4324090+modmuss50@users.noreply.github.com>

(cherry picked from commit e6b6ce1447)
2025-08-30 11:55:01 +01:00
modmuss
974c6322c9
Disallow assert as it leads to inconsistent behaviour. (#4834)
* Disallow `assert` as it leads to inconsistent behaviour.

* Update fabric-biome-api-v1/src/main/java/net/fabricmc/fabric/impl/biome/TheEndBiomeData.java

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

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2025-08-29 17:46:02 +01:00
modmuss
fa6cb72bc8
Ensure all mixin methods and fields are marked Unique as required. (#4618)
* Ensure all mixin methods and fields are marked Unique as required.

* Cleanup

* Update checkstyle.xml

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Update checkstyle.xml

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>

* Add message to MatchXpath rules.

* Update checkstyle.xml

Co-authored-by: Joseph Burton <burtonjae@hotmail.co.uk>

---------

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
Co-authored-by: Joseph Burton <burtonjae@hotmail.co.uk>
2025-05-11 10:34:30 +01:00
modmuss
5f43f98180
Disallow records as part of public API (#4279)
* No public API records

* Add note in contributing

* Explain why

* Fix
2024-12-12 15:50:08 +00:00
modmuss
9468a19de0
Configure spotless for imports, sort imports. (#3365)
* Configure spotless to also do imports. Allows for auto applying.

* Order imports
2023-10-22 13:35:58 +01:00
modmuss50
b83334a063 Split all duplicated packages (#2617)
* Move duplicated v0/v1 impl packages to v0 subpackages

Fixes #2616. The convention is adopted from the command API (v1)
whose impl classes have the v1 subpackage.

* Separate client code into its own packages everywhere

* Fix code style

* Fix code style, part 2

* Allow v0 in package names

* Allow v0 in package names (fixed)

(cherry picked from commit 9244241639)
2022-11-20 13:58:41 +00:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +01:00
Player
f71b366fb1
Update command registration API to reflect 1.19 vanilla changes (#2227)
* Update command registration API to reflect vanilla changes

* Allow module versions in impl+mixin packages

* Use v2 module, keeping v1 for server commands at least

* update, address review

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-05-20 18:39:10 +01:00
Technici4n
cca23f938e Fix #1912 and #1972: inventory updates in transactions (#1979) 2022-03-03 18:15:40 +00:00
Technici4n
f995ab4233 Fabric API Lookup (#1234)
# Fabric API Lookup API v1
## Introduction
This module allows Api instances to be associated with game objects without specifying how the association is implemented. This is useful when the same Api could be implemented more than once or implemented in different ways.

Many thanks to @Grondag for providing the original concept (#1072).
Thanks also go to @i509VCB, @Pyrofab, @sfPlayer1 and the others who were involved with the design of this module.

This is the foundation upon which can be built for example a fluid transfer api (#1166). Closes #1199.

## Flexible Api Querying
## Block Api Usage example
## Building blocks
This PR was changed a lot, please have a look at the README, the package info, and the javadoc for `BlockApiLookup` and `ApiLookupMap` for up-to-date documentation.

## More usage examples
FastTransferLib (https://github.com/Technici4n/FastTransferLib) is an experiment to build an item, fluid and energy transfer api on top of this module. (Which was until recently called `fabric-provider-api-v1`.)

## Missing things?
~~I could add an overload of `BlockApiLookup#find` with nullable `BlockState` and `BlockEntity` parameters, so that the caller can directly provide them if they are available for some reason.~~ Added in later commits.

There is no module to retrieve apis from items or entities yet because there were unsolved issues with those. The community can use the provided building blocks to experiment with their own implementations of `ItemStackApiLookup` and `EntityApiLookup` until the way forward becomes clear, but let's please not delay the `BlockApiLookup` because of that.

Co-authored-by: i509VCB <git@i509.me>
Co-authored-by: PepperBell <44146161+PepperCode1@users.noreply.github.com>
(cherry picked from commit dc716ea167)
2021-03-08 20:35:40 +00:00
Player
d86a720d2c
Checkstyle: Detect package names ending with ss as singular 2020-09-09 03:14:01 +00:00
modmuss50
63435d4b92
Restart Testmods (#593) 2020-05-03 16:56:50 +00:00
liach
1a47cd78f6
Update checkstyle and change tab width to be 4 than 8 (#518)
* Remove unnecessary chmod in travis script
* Update checkstyle and fix indent config
* Travis CI optimizations and checkstyle fixes
2020-04-11 18:21:53 +00:00
Juuxel
ce867d209a Make checkstyle always use English 2020-01-04 19:25:14 +00:00
Player
5a0f9a60f7 Fix checkstyle package check using client/server as the module name and missing suffix validation, adapt missed fabric-renderer-registry package 2019-11-27 13:24:36 +01:00
Player
6d6e6117b4 Fix checkstyle config not supporting windows line endings 2019-11-13 18:46:19 +01:00
Player
b7f9825dbb Add checkstyle verification for package names, fix non-API packages. 2019-11-03 20:14:45 +01:00
Player
dfdb52d6e5 Add checkstyle, format existing code accordingly. 2019-10-27 15:40:26 +01:00