Commit graph

1274 commits

Author SHA1 Message Date
modmuss50
abdb4ad90b
Generate a test datapack from the datagen testmod output. (#2824)
* Add a datapack zip for testing the datagen module

* Fix deprecation
2023-01-05 12:50:01 +00:00
Technici4n
ccd377ba6b
Two Transfer API fixes (#2818)
* Fix #2810: Double chest wrapper not always updating both halves

* Fix #2522: Make creative ContainerItemContext give unique items to the play
2023-01-05 12:49:51 +00:00
apple502j
3fc4752e4f
Entity Selector Option API (#2667)
* Entity Selector Option API

* Fix compile error

* Add default impl

* Apply suggestions from code review

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

Co-authored-by: modmuss50 <modmuss50@gmail.com>
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2023-01-05 12:49:30 +00:00
Technici4n
5176f73dbb
add fabric-recipe-api-v1: Custom ingredients (#2586)
* 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>
2023-01-05 12:49:19 +00:00
modmuss50
2dae9cfaf0 Bump versions 2023-01-02 14:36:27 +00:00
Technici4n
3baeb27ac3
Interaction events fixes (#2774)
* Deprecate `BlockAttackInteractionAware`

* Document PickBlock events, fix nullability and edge case

* Fix `UseEntityCallback` usability and documentation. Fixes #1260. Fixes #1870.
2023-01-02 13:06:35 +00:00
Technici4n
9f179aa14c
Indigo and Renderer API fixes related to fallback consumers (#2775)
* Fix #2639: 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 #1871

* 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
2023-01-02 13:05:49 +00:00
apple502j
b5d379b004
Biome modification API small enhancements (#2789)
* 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 #2079
2023-01-02 13:05:35 +00:00
Shnupbups
5b9a588bfd
Autogenerate Item constructor TAWs (#2795)
`generateAccessWidener` task in TAW module will now automatically generate TAWs for the constructors of non-abstract item classes, similar to how it already did so for blocks.
As such, previously manually added item constructor TAWs have been removed from the template. This also means that `HoeItem` is now TAW'd. (I totally overlooked it earlier... whoops!)
2023-01-02 13:05:24 +00:00
apple502j
85f102ee1a
Object builder API updates (#2798)
* Add feature support to FabricEntityTypeBuilder

* Use IdentityHashMap for EntityType-keyed maps

* Improve tests

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/entity/FabricEntityTypeBuilder.java

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

* Fix naming of static-final field

* Address some reviews

* Rebuild

* Split gametest

* Update fabric-object-builder-api-v1/src/main/java/net/fabricmc/fabric/api/object/builder/v1/entity/MinecartComparatorLogicRegistry.java

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2023-01-02 13:05:10 +00:00
apple502j
bc01e09759
Keybindings API: New Years cleanup (#2799)
* Keybindings API: New Years cleanup

* Remove throws
2023-01-02 13:04:48 +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
Virtuoel
0a2a0d0b13
Fix common tab resetting when reopening creative screen (#2803) 2023-01-02 13:04:06 +00:00
apple502j
4017a8cb18
Catch exception inside client-side JOIN event (#2813)
* 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>
2023-01-02 13:03:53 +00:00
Shnupbups
87855a703c
Fixed blocks with vanilla loot tables making strict validation of datagen fail (#2816)
* 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.
2023-01-02 13:03:40 +00:00
modmuss50
58bef3f2cf Bump versions 2022-12-23 18:04:45 +00:00
modmuss50
33a4e2d71e
Fix ItemGroup language generation. (#2785) 2022-12-23 17:52:51 +00:00
Technici4n
23a79c8a40
Block Entity Lifecycle fixes (#2783)
- Fire client chunk unload event when the load distance is decreased.
  Fixes #1821.
- 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 #2423.
2022-12-23 16:34:09 +00:00
Technici4n
a91e48b70e
Don't break the ordering of ResourcePackProviders (#2784)
Fixes #1671.
2022-12-23 16:00:37 +00:00
Miku
a67331efe6
Add Traditional Chinese (#2776) 2022-12-23 15:59:27 +00:00
Daomephsta
1d37d50279 API for brewing recipes which use Ingredients instead of Items (#2670)
* 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>
(cherry picked from commit 7c6cd14d84)
2022-12-23 15:37:09 +00:00
AlphaMode
6dc0edd789 Deprecated BlockEntityRendererRegistry in favor of vanilla's BlockEntityRendererFactories (#2582)
* 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>

(cherry picked from commit 08b73de4d1)
2022-12-23 15:32:51 +00:00
Technici4n
b808eab9dd
Add more transitive Access Wideners (#2780)
* Add more transitive Access Wideners

- Expose `StateProviderType` constructor. Fixes #474.
- Expose DefaultBiomeCreator.getSkyColor. Fixes #981.
- Make custom `RenderLayer` registration easier. Fixes #1635.
- Add warning at the beginning of the generated AW to prevent manual
  editing of the file.

* Add warning to datagen generated AW
2022-12-23 15:23:14 +00:00
Technici4n
0b401b6a39
Fix #602: Allow querying registered DynamicItemRenderers (#2779) 2022-12-23 15:22:51 +00:00
apple502j
f1e4495b13
Javadoc and typo fixes (#2782) 2022-12-23 15:20:04 +00:00
Sideroo
e022e5d10c
Fix block api resources path (#2749) 2022-12-23 13:37:29 +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
Technici4n
afca2f3e33
Small Cleanups (#2767)
* ServerLoginNetworking javadoc fix

* Improve Rendering Data Attachment javadocs. Fixes #863

* Deprecate `NbtType`. Fixes #1401

* Remove redundancy
2022-12-23 13:10:03 +00:00
Technici4n
422b0dd1b3
Fix #1145: Long enum gamerule name hidden by button (#2768) 2022-12-23 13:09:49 +00:00
modmuss50
71a65ec322
Disable the gametest command on the server by default. (#2769)
Adds the "fabric-api.gametest.command" system property to enable/disable.
2022-12-23 13:09:37 +00:00
modmuss50
a16aaf981b
Fix disconnect screen scissoring on high-resolution displays (#2770) 2022-12-23 13:09:27 +00:00
Technici4n
8a534ba41e
Ensure consistent ordering of datagen TAW (#2781) 2022-12-23 13:09:13 +00:00
modmuss50
c08c81e810 Bump version 2022-12-12 19:27:50 +00:00
modmuss50
d3d735d000
Fix previous creative tab not being restored (#2751) 2022-12-12 19:26:03 +00:00
modmuss50
0db3bc5ba9
Remove 3rd party JD links (#2752)
- They are unstable, when any one of these sites goes down it fails the whole build. And leads to dead links in our javadoc's

- A lot of them are not for the specific version being used.

I will revist this to find a better longer term solution soon. 👍
2022-12-12 19:11:29 +00:00
modmuss50
996b7d73fc Update signing Gradle plugin
(cherry picked from commit 0f74304b0e)
2022-12-11 15:45:07 +00:00
modmuss50
82a27017d9 Update to 1.19.3 (from rc1) 2022-12-11 14:39:06 +00:00
modmuss50
9c733778de Bump version 2022-12-11 14:32:27 +00:00
Teddy Li
a10d22bd14
Load default translations from all namespaces on the server (#2709)
* Introduce fabric:server-language-namespaces custom meta to fabric-resource-loader-v0 (extension of FabricMC/fabric#2668)

* 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>
2022-12-11 14:10:27 +00:00
apple502j
4d2c60634d
Item API: override Item.Settings#requires (#2745) 2022-12-11 13:52:01 +00:00
Juuz
bdbead01ad
Adapt the existing creative inventory page button texture to new position (#2742) 2022-12-11 13:51:51 +00:00
apple502j
e9dee004f1
Refactor FabricBlockSettings to copy and override new stuff (#2741)
* Copy new block settings

* Sort method calls in copy method

* Add more overrides
2022-12-11 13:50:59 +00:00
modmuss50
112a38be2a
Generate access wideners for DataProvider.getName implementations (#2736)
* Generate AW for DataProvider.getName impls

* Remove final

* Typo + improve memory usage
2022-12-11 13:50:46 +00:00
apple502j
a9337210f9
GameTest: improve javadoc (#2734) 2022-12-11 13:50:20 +00:00
miir
8e4e694f3d
Add c:shields convention tag (#2727)
* add shield tag

* regenerata data

Co-authored-by: itsmiir <itsmiir@users.noreply.github.com>
2022-12-11 13:50:05 +00:00
Juuz
1d4d0b5795
Screen API: Fix MinecraftClientMixin overwriting the vanilla logger (#2726) 2022-12-11 13:49:32 +00:00
modmuss50
33cd7c5a40
Add producation server test, publish testmod jar to maven. (#2717)
* Add producation server test, publish testmod jar to maven.

* Fix deprecation
2022-12-11 13:49:21 +00:00
modmuss50
fa25da992d 1.19.3-rc1 2022-12-01 15:46:20 +00:00
modmuss50
70063eb939 Bump version 2022-11-29 18:35:03 +00:00
modmuss50
b7096da8ef
Check stack size in FabricItemGroupEntries (#2705)
* Check stack size in FabricItemGroupEntries

* Add stack to message
2022-11-29 18:18:29 +00:00