Commit graph

1742 commits

Author SHA1 Message Date
Technici4n
e6c7d4eea9 Resource Conditions Additions (#2821)
* Resource Conditions Additions

- Add `registry_contains` condition. Closes #2548.
- Make `fabric:load_conditions` appear first in generated JSON objects.
- Uniformize implementation a bit.

* Update fabric-resource-conditions-api-v1/src/main/java/net/fabricmc/fabric/mixin/resource/conditions/DataProviderMixin.java

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

* itemsLoaded -> itemsRegistered

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit e63306e015)
2023-02-13 09:33:49 +00:00
apple502j
28c7be2139 GameTest: Improve structure loading (#2801)
* GameTest: improve structure loading

* Address issues

* Re-run actions

* Test missing template

* Revert "Test missing template"

This reverts commit 0e7189bf73.

* Update fabric-gametest-api-v1/src/main/java/net/fabricmc/fabric/mixin/gametest/StructureTemplateManagerMixin.java

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

---------

Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
(cherry picked from commit 2ff127f537)
2023-02-13 09:33:46 +00:00
modmuss50
57338cbe24 23w06a 2023-02-08 17:54:34 +00:00
modmuss50
2590abe7d3 Bump version 2023-02-04 14:20:23 +00:00
modmuss50
c477957e8d
[1.19.4] Fail hard when unable to register key bindings, and update Loader. (#2880)
Improve networking API test keybindings.
2023-02-04 14:17:31 +00:00
modmuss50
12a6ba2c15 23w05a 2023-02-01 16:35:59 +00:00
modmuss50
29d0689b28 Bump versions 2023-01-31 10:28:45 +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
BasiqueEvangelist
ae26bc3563 Fix memory leak by using weak set for ArrayBackedEvent list (#2848)
* use weak set for array backed events list

* use thread safe map

(cherry picked from commit 70be179cf3)
2023-01-31 09:53:34 +00:00
modmuss50
683b8893da Update to Loom 1.1 (#2860)
(cherry picked from commit eff3bcb77a)
2023-01-31 09:53:30 +00:00
modmuss50
a1ccd7bfed 23w04a 2023-01-24 16:59:43 +00:00
modmuss50
f8bf55319b Bump version 2023-01-20 19:10:31 +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
Mark
81af046eba [1.19.3] Implement custom SignTypes (#2832)
* 1.19.3 custom sign types

Co-authored-by: AlphaMode <26313415+alphamode@users.noreply.github.com>

* fix mixin name

Co-authored-by: AlphaMode <26313415+alphamode@users.noreply.github.com>
(cherry picked from commit eb2a3ba986)
2023-01-20 18:01:07 +00:00
Technici4n
d471b08bab Fix #2552: Add way to use resource conditions for block loot table datagen (#2823)
(cherry picked from commit 06937c4b07)
2023-01-20 18:00:54 +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
modmuss50
2facd44698 Bump versions 2023-01-05 13:35:20 +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
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