Commit graph

87 commits

Author SHA1 Message Date
modmuss50
afdfc921b8 Remove FabricItem.getAttributeModifiers. 2024-05-30 13:07:25 +01:00
modmuss
b55973447a
1.21-pre1 port (#3811)
* 1.21-pre1 port

* Bump version
2024-05-29 16:25:22 +01:00
opekope2
29e5f1d91b
Fix FabricItem.getAttributeModifiers (#3809) 2024-05-29 15:39:45 +01:00
apple502j
6fc22b9905
Improve 24w21b port (#3801)
* Delete `FabricDimensions`

This broke during the 1.21 cycle and can be easily replaced with `Entity#teleportTo`.

* Rename testmod data directories

* [Breaking] use singular path in GameTest

* Fix attribute modifier in testmod

* Small mixin refactors related to teleportTo

* Fix behavior change in ModNioResourcePack for invalid paths

* Fix javadocs referencing Identifier ctor

* Add new FabricCodecDataProvider ctor

* Move empty structure

* Fix transfer api testmod

* pro tip: don't write datagen output by hand

* Refactor networking API to remove redundant code

* Stop calling CustomDamageHandler in creative mode
2024-05-29 15:31:48 +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
apple502j
0684cd12de
Finish port to 24w20a (#3777)
* [BREAKING] pass entity to EquipmentSlotProvider

* Improve mixin for chunk unload event

* `TestContext#getBlockEntity` result can be used without checks/casts now

* Fix typos
2024-05-23 09:06:12 +01:00
apple502j
5b61bd2784
Fix non-player handling in CustomDamageHandler (#3781) 2024-05-20 09:31:00 +01:00
modmuss
e633f8839b
Port to 24w20a (#3772)
* Port to 24w20a

* Update yarn

* Fix TODOs

* Bump version

---------

Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-05-16 18:47:15 +01:00
modmuss50
5e47b9cbbd 24w19b 2024-05-10 16:33:03 +01:00
Syst3ms
ad0af49c43
Change Enchantment API for data-driven enchantments (#3761)
* Modify enchantment API for new system

breaking: complete overhaul of EnchantingContext

* Incorporate changes by apple

from #3760
2024-05-10 15:13:38 +01:00
modmuss
5c75478521 Add API to modify default item components (#3728)
* Add API to modify default item components

* Add test for removal

* Some review feedback

* API design changes

* Review feedback

* Add overload that takes a Collection<Item>

(cherry picked from commit 5bcea88aba)
2024-05-07 19:06:45 +01:00
modmuss
0af3f5a702
24w18a (#3757)
Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-05-04 14:28:29 +01:00
apple502j
17e985d676
Fix ItemTooltipCallback crash (#3718) 2024-04-17 17:54:48 +01:00
apple502j
c5fc38b3f7
Finish port to 1.20.5-pre1 (#3706)
* Buildscript changes

* Particle API: port and some refactor

* Add support for Ingredient in FabricBrewingRecipeRegistry

* Add private ctor to ClientPlayerBlockBreakEvents

Not related to port, but something I've found during the process.
Also adds final to CommonLifecycleEvents.

* Fix Sound API testmod

* Fix broken javadocs

* Codec-related changes

* Document behavior of SUCCESS_NO_ITEM_USED in UseEntityCallback

* Add getEnabledFeatures

* checkstyle
2024-04-14 13:26:09 +01:00
Syst3ms
8f5205a8a1
Enchantment API (#3627)
* ALLOW_ENCHANTING event

* Intrinsic enchantments + testmod

also fixed a bug in the testmod that prevented the custom damage handler from ever working

* Item-based override mechanism

* Replaces part of the use cases of the event with a convenient method to override in FabricItem.
* Updated and tested the testmod.

* javadoc

* Move event logic to FabricItemStack

* oops

* Simplify mixin

* Replace ActionResult with TriState

* Use TriState in testmod

* requests

* Clarify jdoc

* Ship without intrinsic enchantments at first

* Checkstyle

* Checkstyle

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-04-10 23:02:11 +01:00
modmuss
74e2f560d5
1.20.5-pre1 (#3700)
* 1.20.5-pre1

* BrewingRecipeRegistryBuilderCallback

* Remove debug line

* Fix build

* Bump version
2024-04-10 19:02:33 +01:00
modmuss50
f1e646e4d5 24w14a & Java 21 2024-04-03 15:46:52 +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
e9d2a72b4f
24w12a (#3658)
# Removed
- FabricItemStack.isSuitableFor (replaced with vanilla component)
- FabricItemStack.getFoodComponent (replaced with vanilla component)
- ResourceReloadListenerKeys.LOOT_TABLES
- fabric-resource-conditions-api-v1 support for loot tables

# Disabled modules
- fabric-loot-api-v2
- fabric-mining-level-api-v1
2024-03-20 19:08:34 +00:00
modmuss50
9bd9228c21 24w11a 2024-03-14 16:55:10 +00:00
apple502j
42c290b4ca
24w10a porting fixes (#3638)
* Rename mixin using unmapped name

* Fix potential crash in item API testmod

* Improve custom ingredient javadoc

* More javadoc improvements

* Add more tests

* whoops

* Fix typos

* Remove test for strict NBT matching

* another whoopsie

* Finish NBT -> components changes

Breaking change: `FabricItem#allowNbtUpdateAnimation` was renamed to
`allowComponentsUpdateAnimation`.

* Fix broken javadoc links

* Fix broken screen handler testmod
2024-03-12 09:22:55 +00:00
modmuss50
031f0cf067 24w10a 2024-03-06 16:40:52 +00:00
modmuss
1172e89799
24w09a (#3623)
* In game

* More fixes

* Small fixes + changes

* Rename

* Fix test
2024-02-29 19:16:35 +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
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
fd154599a6 Stack aware getFoodComponent (#3520)
* Stack aware `getFoodComponent`

Co-authored-by: Phoupraw <50520903+phoupraw@users.noreply.github.com>

* Back to redirects

---------

Co-authored-by: Phoupraw <50520903+phoupraw@users.noreply.github.com>
(cherry picked from commit d6f2b0841c)
2024-01-15 13:42:21 +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
435112151c 1.20.2-pre1 2023-09-05 16:31:02 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50: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
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
03ef495b7f 1.20-pre1 2023-05-10 14:51:08 +01:00
modmuss50
fb8d95dacb Split test mods into client and common. (#3033) 2023-05-01 14:04:29 +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
158c189089 23w14a 2023-04-05 17:18:33 +01:00
Juuz
09a3510c69
EquipmentSlotProvider: Add javadoc link to getPreferredEquipmentSlot (#2935) 2023-03-15 09:14:00 +00:00
modmuss50
ae0966baae
Fix all valid Mixin AP warnings. (#2914) 2023-02-22 12:54:50 +00:00
modmuss50
57338cbe24 23w06a 2023-02-08 17:54:34 +00:00
modmuss50
12a6ba2c15 23w05a 2023-02-01 16:35:59 +00:00
modmuss50
28efac3df2 Fix vanilla behaviour change causing Dragon Breath's to leave an empty Glass Bottle in Brewing Stand (#2874)
This fix restores the previouslly broken behaviour of item remainders in brewing stands.

(cherry picked from commit 312c329484)
2023-01-31 10:20:25 +00:00
modmuss50
a1ccd7bfed 23w04a 2023-01-24 16:59:43 +00:00
Technici4n
364b4f31bd Fix ItemStack.EMPTY.getItem() rarely returning null due to threading (#2826)
* Fix ItemStack.EMPTY.getItem() rarely returning null due to threading

* Overwrite instead

(cherry picked from commit c3530bb1c6)
(cherry picked from commit 693ffc0581)
2023-01-20 18:08:23 +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
Silver
e498f5f0a9
Replace old nullability comments with annotations (#2800)
* Replace useless nullability comments with jetbrains annotation

* These were old comments

* Revert "These were old comments"

This reverts commit 4e9555ad51.

* checkstyle + nullability in mixin
2023-01-02 13:04:34 +00:00
modmuss50
99f9db8063
Cleanup Environment annotation usage. (#2755)
* Remove @Environment(EnvType.CLIENT) from BoundedIntRule.validate

* Move ItemTooltipCallback to client source set

* Remove @Environment(EnvType.CLIENT) annotation

* Remove @Environment(EnvType.SERVER) from WorldChunkMixin
2022-12-23 13:10:16 +00:00