Commit graph

1208 commits

Author SHA1 Message Date
modmuss50
6ed476d6fa add fabric-recipe-api-v1: Custom ingredients ()
* Fabric custom ingredient API

* More Ingredient API work

* Optimize shapeless matching logic

* Fix all the things

* Move custom ingredient network serialization to account for ingredient extension API

* Apply suggestions from code review

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Address 🍎 review

* Get rid of the @Overwrite

* Implement graceful fallback for clients not supporting some custom ingredients

* Move custom ingredient code to new Recipe API module

* Fix client package change

* Address review comments

- And/Or -> All/Any
- Move builtin ingredient registration to entrypoint
- Initial protocol version is 1
- Misc other changes

* Add testing instructions

* Use a List for `getMatchingStacks`

* Overengineer ingredient query a bit

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit 5176f73dbb)
2023-01-05 13:08:25 +00:00
modmuss50
64bd380d4d Bump versions 2023-01-02 14:36:09 +00:00
apple502j
82db024a24 Biome modification API small enhancements ()
* Allow OptionalInt in BiomeModificationContext

For some reason, vanilla uses `Optional<Integer>` instead of
the preferred `OptionalInt`. Add an override that allows passing
`OptionalInt`. For consistency with vanilla, the old method is NOT
deprecated.

* Do not rely on Identifier identity when checking registration

`Identifier` is a value-based class and should never be compared
using `==`. Luckily, this does not cause bugs right now.
(Using `equals` is worse, since it'll prevent spawning pigs.)
Instead use the proper method of checking if an entry is registered.

* Fix 

(cherry picked from commit b5d379b004)
2023-01-02 14:16:57 +00:00
Shnupbups
2d2baf4bf6 Fixed blocks with vanilla loot tables making strict validation of datagen fail ()
* Fixed blocks with vanilla loot tables making strict validation of datagen fail

Previously, blocks that used `.dropsLike(block)` in their block settings to use a vanilla block's loot table, or `.dropsNothing()` to use the `minecraft:empty` loot table, would cause strict validation in data generation to fail as the vanilla loot tables wouldn't be present in the mod's own block loot table generator.

This fixes that by ensuring that the block's loot table ID has a namespace that matches the loot table generator before adding it to the missing IDs list.

Two test blocks were added to the testmod, one which uses `.dropsLike(Blocks.STONE)` to use the same loot table as Stone, and one that uses `.dropsNothing()`. Previously, these would have caused strict validation to fail as the `minecraft:stone` and `minecraft:empty` loot tables aren't generated by the testmod's generator. Now they pass just fine.

* Fixed blocks with vanilla loot tables making strict validation of datagen fail

Previously, blocks that used `.dropsLike(block)` in their block settings to use a vanilla block's loot table, or `.dropsNothing()` to use the `minecraft:empty` loot table, would cause strict validation in data generation to fail as the vanilla loot tables wouldn't be present in the mod's own block loot table generator.

This fixes that by ensuring that the block's loot table ID has a namespace that matches the loot table generator before adding it to the missing IDs list.

Two test blocks were added to the testmod, one which uses `.dropsLike(Blocks.STONE)` to use the same loot table as Stone, and one that uses `.dropsNothing()`. Previously, these would have caused strict validation to fail as the `minecraft:stone` and `minecraft:empty` loot tables aren't generated by the testmod's generator. Now they pass just fine.

(cherry picked from commit 87855a703c)
2023-01-02 13:13:21 +00:00
Technici4n
562bff6e4c Interaction events fixes ()
* Deprecate `BlockAttackInteractionAware`

* Document PickBlock events, fix nullability and edge case

* Fix `UseEntityCallback` usability and documentation. Fixes . Fixes .

(cherry picked from commit 3baeb27ac3)
2023-01-02 13:09:49 +00:00
Technici4n
2e5408b563 Indigo and Renderer API fixes related to fallback consumers ()
* Fix : Indigo fallback consumer does not respect BlendMode or emissivity

* Change renderer testmod to test material change

* Remove presumably unneeded `quad.geometryFlags()` call

* Also test emissivity

* Call emitBlockQuads in the testmod

* Allow passing the block state explicitly to the fallback consumer. Fixes 

* Expand testmod to also test item models

* Also fix fallback consumer ignoring material for items

* Slight changes

* Introduce new interface for the expanded fallback consumer

* Add javadoc to ModelHelper

(cherry picked from commit 9f179aa14c)
2023-01-02 13:09:44 +00:00
apple502j
5c4fce2850 Keybindings API: New Years cleanup ()
* Keybindings API: New Years cleanup

* Remove throws

(cherry picked from commit bc01e09759)
2023-01-02 13:07:46 +00:00
Silver
9785ec356d Replace old nullability comments with annotations ()
* Replace useless nullability comments with jetbrains annotation

* These were old comments

* Revert "These were old comments"

This reverts commit 4e9555ad51.

* checkstyle + nullability in mixin

(cherry picked from commit e498f5f0a9)
2023-01-02 13:07:42 +00:00
apple502j
10eb22f456 Catch exception inside client-side JOIN event ()
* Catch exception inside client-side JOIN event

* Update fabric-networking-api-v1/src/client/java/net/fabricmc/fabric/impl/networking/client/ClientPlayNetworkAddon.java

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

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
(cherry picked from commit 4017a8cb18)
2023-01-02 13:07:38 +00:00
modmuss50
3e1e13ab8f Bump versions 2022-12-23 18:04:07 +00:00
Technici4n
1b46dc7866 Block Entity Lifecycle fixes ()
- Fire client chunk unload event when the load distance is decreased.
  Fixes .
- Fire client chunk unload event before entities are cleared from the
  chunk to fix block entity unload event not firing.
  Clarify that block entity data is unreliable in the block entity load
  events.
  Fixes .

(cherry picked from commit 23a79c8a40)
2022-12-23 16:35:13 +00:00
Technici4n
251d254ae1 Don't break the ordering of ResourcePackProviders ()
Fixes .

(cherry picked from commit a91e48b70e)
2022-12-23 16:35:09 +00:00
Miku
63b2489b25 Add Traditional Chinese ()
(cherry picked from commit a67331efe6)
2022-12-23 16:34:45 +00:00
Daomephsta
7c6cd14d84
API for brewing recipes which use Ingredients instead of Items ()
* API for brewing recipes which use Ingredients instead of Items

* Improve comments and JavaDoc

* Update mixin compatibility level

* Replace accessor mixin with access widener

* Fix double space

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-12-23 15:32:15 +00:00
AlphaMode
08b73de4d1
Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories ()
* Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories

* Undo unintended change

* Update fabric-transitive-access-wideners-v1/src/main/resources/fabric-transitive-access-wideners-v1.accesswidener

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

* Update BlockEntityRendererRegistry javadoc to match others

* Implement sign renderer test

* Fix template

* Change SignTestBlockEntity to SignBlockEntityTest

Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com>
2022-12-23 15:32:04 +00:00
Technici4n
a9097c1907 Fix : Allow querying registered DynamicItemRenderers ()
(cherry picked from commit 0b401b6a39)
2022-12-23 15:30:53 +00:00
apple502j
4d0d57038f Javadoc and typo fixes ()
(cherry picked from commit f1e4495b13)
2022-12-23 15:30:50 +00:00
Sideroo
e415d50e90 Fix block api resources path ()
(cherry picked from commit e022e5d10c)
2022-12-23 15:30:48 +00:00
modmuss50
6e0787e663 Small Cleanups ()
* ServerLoginNetworking javadoc fix

* Improve Rendering Data Attachment javadocs. Fixes 

* Deprecate `NbtType`. Fixes 

* Remove redundancy

(cherry picked from commit afca2f3e33)
2022-12-23 15:30:42 +00:00
Technici4n
b6b6abb47f Fix : Long enum gamerule name hidden by button ()
(cherry picked from commit 422b0dd1b3)
2022-12-23 15:27:34 +00:00
modmuss50
c99de4d0d0 Disable the gametest command on the server by default. ()
Adds the "fabric-api.gametest.command" system property to enable/disable.

(cherry picked from commit 71a65ec322)
2022-12-23 15:27:31 +00:00
modmuss50
82198ac2c7 Fix disconnect screen scissoring on high-resolution displays ()
(cherry picked from commit a16aaf981b)
2022-12-23 15:27:29 +00:00
modmuss50
0f74304b0e Update signing Gradle plugin 2022-12-11 15:41:34 +00:00
modmuss50
3729a30a41 Bump version 2022-12-11 14:32:15 +00:00
Teddy Li
574a764801 Load default translations from all namespaces on the server ()
* Introduce fabric:server-language-namespaces custom meta to fabric-resource-loader-v0 (extension of )

* Fix testmod assertion message

* Automatically detect every en_us.json files in mod container
Remove fabric:server-language-namespaces custom meta detection

* Remove unused custom field in fabric.mod.json

* Update license

* Update style

* cleanup format

* Fix checkstyle, move constructor

Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit a10d22bd14)
2022-12-11 14:12:51 +00:00
apple502j
e4fecd81f0 GameTest: improve javadoc ()
(cherry picked from commit a9337210f9)
2022-12-11 14:12:43 +00:00
miir
27265b3409 Add c:shields convention tag ()
* add shield tag

* regenerata data

Co-authored-by: itsmiir <itsmiir@users.noreply.github.com>
(cherry picked from commit 8e4e694f3d)
2022-12-11 14:12:40 +00:00
Juuz
b0bc9a679c Screen API: Fix MinecraftClientMixin overwriting the vanilla logger ()
(cherry picked from commit 1d4d0b5795)
2022-12-11 14:12:37 +00:00
modmuss50
5d5f11fb3d Bump version 2022-11-29 18:34:50 +00:00
apple502j
3b1d070f49 Networking: fix type of created packet ()
(cherry picked from commit d9ac3c39e0)
2022-11-29 18:11:36 +00:00
Technici4n
6eb9a2a153 AttackBlockCallback: creative fix and javadoc update ()
* AttackBlockCallback: creative fix and block break delay

* More return value clarifications

* Revert CONSUME_PARTIAL behavior

* Apply suggestions from code review

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

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit 422b77fbfd)
2022-11-29 18:09:25 +00:00
Technici4n
e7aeff4505 Add BakedModel unwrapping API ()
* Add BakedModel unwrapping API

* Allow WrapperBakedModel to not have an inner model

(cherry picked from commit 2063beff56)
2022-11-29 18:09:21 +00:00
modmuss50
0ac263625e Bump version 2022-11-22 17:01:50 +00:00
modmuss50
0c110c76fd Remove maven specific jar
(cherry picked from commit fb429b1390)
2022-11-22 16:58:56 +00:00
modmuss50
d12c5477ae Add license to client only entries for client modules. ()
(cherry picked from commit eed73ed20d)
2022-11-22 16:55:08 +00:00
Juuz
9d081d647b
Convert flowing fluids to still ones in fluid variants ()
* Convert flowing fluids to still ones in fluid variants

Closes .

* Improve error message
2022-11-22 16:34:14 +00:00
Juuz
0d0f21023d
Generate package-info files for all impl and mixin packages ()
* Generate package-info files for all impl and mixin packages

* Add javadoc to generated package-infos, use multiline string

* Simplify code

* Remove manual ApiStatus.Internal on impl classes

* Update CONTRIBUTING.md to remove ApiStatus.Internal for impl classes

* Fix Gradle deprecations

* Fix more Gradle deprecations

* Add task metadata

* Support client-main split

* Remove workaround for client packages

* Try to fix Gradle 8 deprecations

* Try to fix Gradle 8 deprecations, part 2

I'm hoping that using the SourceDirectorySet instead of converting it to a
Set<File> (which is pointless?) will carry the build dependencies over.

* Add clean packageInfo task

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-11-22 16:33:56 +00:00
modmuss50
00d42ba6c3 Bump version 2022-11-20 14:53:24 +00:00
modmuss50
f9594cb682 Only load default language on the server. 2022-11-20 14:11:53 +00:00
Technici4n
cd10d4fc03
Fix : Transfer API edge case with bad isValid overrides ()
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-11-20 13:35:10 +00:00
AlphaMode
fa140d5976
Support stack aware recipe remainders ()
* Support stack aware recipe remainders

* Fix checkstyle

* Remove all overwrites

* Add FabricItemStack and make RecipeRemainderHandler thread safe

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>

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

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

* Remove hasRecipeRemainder, Update test mod and remove unneeded mixins

* Update fabric-item-api-v1/src/testmod/java/net/fabricmc/fabric/test/item/CustomDamageTest.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Avoid copying the ItemStack

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/mixin/item/AbstractFurnaceBlockEntityMixin.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Sneakily change duplicate keybinding to a less used key

* make everything thread safe and improve AbstractFurnaceBlockEntityMixin

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

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

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItemStack.java

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

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* clear thread local and change field prefix

* forgot the allow

* Update fabric-item-api-v1/src/main/java/net/fabricmc/fabric/api/item/v1/FabricItem.java

Co-authored-by: Salvatore Peluso <info@devpelux.xyz>

* Update fabric-item-api-v1/src/testmod/java/net/fabricmc/fabric/test/item/CustomDamageTest.java

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

* Add FurnaceGameTest

* Change test keybind back to LShift

* Fix brewing stand remainder and fix nitpicks

* add code example to remainder javadoc

* Fixed and reformatted docs, changed recipe mixin behavior to store the remainder stack instead of the original stack, refactoring.

* Added gametests for brewing stand and recipe mixins, fixed furnace gametest compairing stacks with themselves.

* Use (0,1,0) position for game tests

* Review changes

Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
Co-authored-by: Salvatore Peluso <info@devpelux.xyz>
Co-authored-by: modmuss50 <modmuss50@gmail.com>
2022-11-20 13:25:23 +00:00
Juuz
9244241639
Split all duplicated packages ()
* Move duplicated v0/v1 impl packages to v0 subpackages

Fixes . 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)
2022-11-20 13:25:05 +00:00
Kevinthegreat
28270f5886 Fixed ScreenEvents Javadoc ()
(cherry picked from commit 33716ae262)
2022-11-20 13:24:41 +00:00
90
ad31814d3c
Add access widener for ItemModelGenerator#writer ()
Allows for the use of custom Models and TextureMaps for generating item models.
2022-11-20 13:23:37 +00:00
modmuss50
3dd584b41f
Adjust nether biomes injection point ()
Co-authored-by: apple502j <33279053+apple502j@users.noreply.github.com>
2022-11-20 13:19:53 +00:00
Jonathan Coates
1f9b83131f
Load modded translations on the server ()
* Load modded translations on the server

* Don't load built-in mods
2022-11-20 13:19:31 +00:00
Jonathan Coates
c4b89cc4a6
Fix shulker boxes accepting other shulkers when using a directionless InventoryStorage ()
* Fix shulker boxes accepting other shulkers

If a mod creates a directionless InventoryStorage, it only calls
Inventory.isValid and not SidedInventory.canInsert. However, shulker
boxes only override the latter, allowing shulkers to be inserted into
them.

* Check for insertion in inventorySlotWrapper instead
2022-11-20 13:19:18 +00:00
modmuss50
49b2f75224 Bump version 2022-11-07 20:35:45 +00:00
modmuss50
dc6bc338e4 Enforce Minecraft 1.19.2
As far as I know everyone who was on 1.19.1 has updated to 1.19.2. It's not something that was tested.

This will improve the error message if people try to run this on 1.19.3.
2022-11-07 19:19:00 +00:00
Dalsu
3e1ba48e78
Edit ko-kr translations for resource-loader ()
* Create ko_kr.json

* Create ko_kr.json

* Edited ko_kr translation
2022-11-07 18:30:27 +00:00