Commit graph

171 commits

Author SHA1 Message Date
Fabric Bot
780172709f
New Translation updates (#3867)
* New translations en_us.json (Tatar)

* New translations en_us.json (Russian)

* New translations en_us.json (Icelandic)

* New translations en_us.json (Esperanto)

* New translations en_us.json (Tatar)

* New translations en_us.json (German)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Italian)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Russian)
2024-06-25 18:15:31 +01:00
Octol1ttle
ab7edbac5e
Add MinecraftClient/Server instances to networking contexts (#3850)
* change: add MinecraftClient/Server instances to networking contexts

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* style: optimize imports

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* change: use client instance from context in FabricRegistryClientInit

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* fix: remove unused import <_<

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

* fix: update Javadocs in Networking classes

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>

---------

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
2024-06-17 18:10:28 +01:00
modmuss
cb5ced13ef
Translation updates (#3864) 2024-06-17 18:03:29 +01:00
modmuss
b9828ba31a
No longer allow unused registry ids when syncing. (#3792)
* No longer allow unused registry ids when syncing.

* Freeze registries much sooner after mod init
2024-05-29 15:31:39 +01:00
modmuss
6573ed8ccc
24w21b (#3789)
Co-authored-by: Drex <nicknamedrex@gmail.com>
Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
2024-05-23 10:20:54 +01:00
Jonathan Coates
1c4a86e83a Support extending dynamic registries in datagen (#3744)
- Add all dynamic registries to the initial registry.
 - Expose a getter for the registry future.
 - Register cloners for all dynamic registries.

(cherry picked from commit ad4744939b)
2024-05-07 19:06:53 +01:00
modmuss
0af3f5a702
24w18a (#3757)
Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-05-04 14:28:29 +01:00
modmuss
f1240ba7db
Test for and fix registries that need syncing (#3723)
* Test for and fix registries that need syncing

* Fix duplicate
2024-04-20 11:28:54 +01:00
Fabric Bot
aae0949a31 Translation updates (#3618)
* New translations en_us.json (Korean)

* New translations en_us.json (Vietnamese)

* New translations en_us.json (Korean)

* New translations en_us.json (Korean)

* New translations en_us.json (Vietnamese)

* New translations en_us.json (Korean)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (French)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Estonian)

* New translations en_us.json (Malay)

* New translations en_us.json (Malay)

* New translations en_us.json (Malay)

* New translations en_us.json (German)

* New translations en_us.json (Czech)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Spanish, Chile)

* New translations en_us.json (Spanish, Chile)

* New translations en_us.json (Spanish, Chile)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Polish)

* New translations en_us.json (Toki Pona)

* New translations en_us.json (Toki Pona)
2024-04-10 22:17:25 +01:00
modmuss50
f1e646e4d5 24w14a & Java 21 2024-04-03 15:46:52 +01:00
apple502j
97f703da44
Improve data attachment port (#3678)
* Bump yarn

* Apply yarn update

* Fix porting of Data Attachment block entity support

* Fix FrameBlockEntity testmod
2024-04-03 15:39:47 +01:00
apple502j
9b3069f652
Fully port to 24w12a (#3664)
* Bump yarn

* Apply yarn update

* Sync map decorations type registry

* Remove Mining Level API

* Port loot API

* whoops

* Rename LootManagerMixin

* Fix javadoc

* Fix registerGiftLootTable

* RegistryKey is traditionally compared using identity

* Fix wrong loot source being used
2024-03-27 16:47:29 +00:00
modmuss
403ef19793
Sync data component types registry (#3631) 2024-03-06 15:46:08 +00:00
Fabric Bot
b65f60eeee Translastion updates (#3605)
* New translations en_us.json (Spanish)

* New translations en_us.json (Bulgarian)

* New translations en_us.json (German)

* New translations en_us.json (Greek)

* New translations en_us.json (Finnish)

* New translations en_us.json (Japanese)

* New translations en_us.json (Korean)

* New translations en_us.json (Polish)

* New translations en_us.json (Swedish)

* New translations en_us.json (Turkish)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Vietnamese)

* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Spanish, Mexico)

* New translations en_us.json (Estonian)

* New translations en_us.json (Tatar)

* New translations en_us.json (French)

* New translations en_us.json (Spanish)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Ukrainian)

* New translations en_us.json (Chinese Traditional)

* New translations en_us.json (Estonian)

* New translations en_us.json (Russian)

* New translations en_us.json (French)

* New translations en_us.json (Spanish)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Ukrainian)

* New translations en_us.json (Estonian)

* New translations en_us.json (Dutch)

* New translations en_us.json (Dutch)

* New translations en_us.json (Dutch)

* New translations en_us.json (Finnish)

* New translations en_us.json (Finnish)

* New translations en_us.json (Italian)

* New translations en_us.json (Italian)

* New translations en_us.json (Swedish)

* New translations en_us.json (German)

* New translations en_us.json (German)

* New translations en_us.json (German)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (German)

(cherry picked from commit 58f8c01215)
2024-02-25 13:31:19 +00:00
modmuss
ea0cfbb1f5
Fix registry sync (#3598)
* Fix registry sync

* Don't use read/writeByteArray, as we know the whole payload is the bytearray

* Add unit tests
2024-02-18 13:04:57 +00:00
apple502j
109a837c6e
24w06a porting fixes (#3578)
* Bump yarn

* Fix TagsLoaded event again

* Resource Loader: internal refactor (name to ID)

* More refactors

* Reset ignoreFallDamageAboveY when using custom elytra

* fix checkstyle
2024-02-09 17:36:06 +00:00
modmuss50
54b4400cee 24w06a 2024-02-07 19:01:58 +00:00
modmuss
03be9f1df2
Port to 24w05a (#3560)
Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-01-31 20:24:57 +00:00
apple502j
bbf5165de7
Fix porting issues in Dynamic Registries API (#3555)
* Fix TAGS_LOADED event not being invoked on client join

* Skip loading empty dynamic registries (client-side)

* Update ClientTest to handle 24w04a

* Skip syncing empty dynamic registries (server-side)

* Fix dynamic registry using wrong codec, tag syncing depending on class load order

* Fix DynamicRegistrySetupEvent being called on client

* Test syncing empty registry's tag

* Actually check skipOnEmpty

* Downgrade AssertionError to log due to MC-268096
2024-01-28 12:56:20 +00:00
modmuss50
9bfa344c7d 24w04a 2024-01-24 19:59:21 +00:00
apple502j
3945d7aeb7
Fix some registries being unsynced (#3550) 2024-01-24 16:21:02 +00:00
modmuss
7b70ea8a7a
Port to 24w03b (#3537)
* Deprecate FabricBlockSettings

* Deprecate FabricItemSettings

* Start on 24w03a

* Main menu :)

* Update mappings

* PayloadTypeRegistry

* Networking part 2 of many

* Networking part 3 of many

* Networking part 4 of many

* Recipe api

* Port Item API to 1.20.5

* Is this even right?

* Port FabricParticleTypes to 1.20.5

* Remove redundant fuel caching logic

* Remove fabric-containers-v0, deprecated since 2020

* Regsync work

* Adapt screen handler to new networking

* Update yarn + more work

* More mapping updates

* Compile fixes

* Checkstyle + small fixes

* Single and multiplayer fixes

* Handle play packets on main thread.

* Update mappings

* Even more networking

* Networking tests

* Fix todo's

* Update javadocs

* Networking API improvements

* Some small regsync refactors

* Fix handling of null NBT in NbtIngredient

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/block/FabricBlockSettings.java

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>

* Add context objects

* ChannelInfoHolder.getPendingChannelsNames -> fabric_getPendingChannelsNames

* Fix crash

* send `c:register` packet for play phase instead of config (#3544)

* Bump version

---------

Co-authored-by: ErrorCraft <51973682+ErrorCraft@users.noreply.github.com>
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: Drex <nicknamedrex@gmail.com>
Co-authored-by: deirn <deirn@bai.lol>
2024-01-22 18:24:37 +00:00
modmuss50
80f8cf516f Update Fabric Loader 2024-01-17 17:15:38 +00:00
modmuss
3434862fbd
Port to 23w51b (#3474)
Breaking changes:

- `FabricBrewingRecipeRegistry.registerPotionRecipe` takes `RegistryEntry<Potion>` instead of `Potion`
- `SculkSensorFrequencyRegistry.regster` takes `RegistryKey<GameEvent>` instead of `GameEvent`
- `FabricLanguageProvider.add` takes `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `FabricTagProvider.GameEventTagProvider` was removed replace with `FabricTagProvider<GameEvent>`
- `FabricItem.getAttributeModifiers` returns a Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
- `ModifyItemAttributeModifiersCallback.modifyAttributeModifiers` takes Multimap with a key of `RegistryEntry<EntityAttribute>` instead of `EntityAttribute`
2023-12-18 18:47:42 +00:00
modmuss
78d798af9d
Update to loader 0.15 (#3451) 2023-12-08 15:19:17 +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
10292b95f5 23w40a 2023-10-05 09:45:32 +01:00
apple502j
34a3e0e2cb
Include namespace in modded registry tag path (#3303)
* Include namespace in modded registry tag path

* Document tag namespace change
2023-09-07 15:09:08 +01:00
modmuss50
f091af96c5 23w33a 2023-08-17 16:51:04 +01:00
modmuss50
09816d0313 Fix createAndPopulateRegistryMap() always returning null, preventing registry sync.
This was caused by the changes in the port to 23w32a
2023-08-11 12:14:20 +01:00
modmuss50
0ba8e9ce03 23w32a 2023-08-09 18:04:04 +01:00
modmuss
0b2eb405dc
[1.20.2] Support common registration packets. Add configuration task API (#3244)
* Config networking refactor :)

* Add some unit tests for common packets.

* write FabricPacket on network thread.
Split ServerConfigurationConnectionEvents into two.

* Fixes

* Rename event

* Add a testmod + ssome docs

* Improve registry sync fixing deadlock in a number of cases.

* Cleanup channel events.

* Review feedback and fixes.
2023-08-09 16:30:51 +01:00
modmuss
86b12645b9
23w31a 2023-08-07 09:09:38 +01:00
modmuss
f4b7e42468
Update to loom 1.3 and use Mod Publish Plugin (#3158)
* Update to loom 1.3

* Fix more 1.3 deprecations

* Opps

* Move to mod publish plugin

* Revert some changes

* Fix some more Gradle deprecations

* Fix names

* Remove extra stuff

* Cleanup
2023-08-02 18:51:21 +01:00
modmuss
4df89eb2a6
Fix #3215 - Only add namespace to registries added using the Fabric API. (#3219)
* Fix #3215 - Only add namespace to registries added using the Fabric API.

* Cleanup
2023-07-25 14:03:45 +01:00
Juuz
2e061fd481
Add dynamic registry API (#3163)
* Add API for adding custom dynamic registries

Closes #1012, supersedes #1031 and #2719.

* Add missing license headers

* Clarify RegistryLoaderMixin namespace injection

* Replace event with static registration, add skeleton for sorting registries

* Fix typo

* Refactor event phase sorting system for use with dynamic registries (#1)

* Make minor changes to Technici4n's PR

* Add test for nested dynamic objects

* Revert "Add test for nested dynamic objects"

This reverts commit 486e3e1ce0.

* Revert "Make minor changes to Technici4n's PR"

This reverts commit 741bd52c1e.

* Revert "Refactor event phase sorting system for use with dynamic registries (#1)"

This reverts commit bb7c8b8790.

* Remove sorting API

* Add support for defaulted dynamic registries

* Re-add test for nested dynamic objects

* Add missing license headers

* Fix typo

* Remove defaulted dynamic registries; flatten registration methods

* Remove last reference to registry sorting

* Add option to skip syncing for empty dynregs

* Update DynamicRegistrySyncOption docs

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

* Address review feedback

* Add registry namespace to tag paths for modded registries

* Move dynamic registry tests into their own class for readibility

* Finish DynamicRegistries doc

* Only apply tag change to dynamic registries

* Fix checkstyle

* Update fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/api/event/registry/DynamicRegistries.java

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>

---------

Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2023-07-18 12:53:34 +01:00
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +01:00
modmuss50
4d8536c91f
Add and test for missing method overrides in FabricBlockSettings (#3056) 2023-05-11 09:25:08 +01:00
modmuss50
ce75acf5fd
[1.20] Remove deprecated NbtRegistryPacketHandler (#3026)
* Remove deprecated NbtRegistryPacketHandler

* Remove more
2023-05-01 13:55:38 +01:00
modmuss50
b3f2574b16 23w17a 2023-04-26 18:18:06 +01:00
modmuss50
10328404b3 Improve missing local registry entries error message. (#3004) 2023-04-23 13:29:02 +01:00
modmuss50
eff26386be
23w16a (#3018)
# Breaking changes
- `VillagerPlantableRegistry` replaced with `ItemTags.VILLAGER_PLANTABLE_SEEDS`
- `FabricItemGroup.builder()` no longer takes an `Identifier`
- `FabricItemGroup.build()` no longer registers the ItemGroup, this now needs to go in the vanilla registry.
- `ItemGroupEvents.modifyEntriesEvent` now takes a `RegistryKey<ItemGroup>` in place of an `Identifier`
- `FabricLanguageProvider` now takes a `RegistryKey<ItemGroup>` in place of an `ItemGroup`
- `IdentifiableItemGroup` removed, replaced with vanilla registries.
- `FabricMaterialBuilder` removed, no replacement.
- `HudRenderCallback.onHudRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `ScreenEvents.beforeRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `ScreenEvents.afterRender` now passed a `DrawableHelper` in place of `MatrixStack`
- `Screens.getItemRenderer()` removed. Replace with `MinecraftClient.getItemRenderer()`

`DrawableHelper` is likely to be renamed soon, see: https://github.com/FabricMC/yarn/pull/3548/
2023-04-20 20:03:32 +01:00
modmuss50
a383ab9763 Support creating FabricRegistryBuilder with a RegistryKey, deprecate Class based APIs. (#2905)
* Fix #846

* Update javadoc.

(cherry picked from commit f7b4d36421)
2023-02-23 10:15:09 +00:00
modmuss50
ae0966baae
Fix all valid Mixin AP warnings. (#2914) 2023-02-22 12:54:50 +00:00
modmuss50
a1ccd7bfed 23w04a 2023-01-24 16:59:43 +00:00
modmuss50
b69ba7fabe
23w03a (#2854)
* First look at 223w03a

* Fix login

* Support onboarding screen in client tests

* Fix AFTER_ENTITY_CHANGE_WORLD event

* Bump version
2023-01-18 21:21:41 +00:00
Technici4n
1134c5b850
Remove leftover @ApiStatus.Internal annotations and add annotation validation (#2825)
* Remove leftover `@ApiStatus.Internal` annotations and add annotation validation

* Simplify

* Simplify more

* Update gradle/validate-annotations.gradle

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2023-01-05 12:50:15 +00:00
apple502j
2608564621
Pass DynamicRegistryView to DynamicRegistrySetupCallback (#2696)
* Pass DynamicRegistryView to DynamicRegistrySetupCallback

* Update fabric-registry-sync-v0/src/main/java/net/fabricmc/fabric/impl/registry/sync/DynamicRegistryViewImpl.java

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-11-26 20:00:04 +00:00
modmuss50
2894d6df22 1.19.3-pre1 2022-11-22 16:28:48 +00: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