Commit graph

79 commits

Author SHA1 Message Date
modmuss50
9bfa344c7d 24w04a 2024-01-24 19:59:21 +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
deirn
65757c5d7a fix jukebox state getting changed mid-transaction (#3517)
(cherry picked from commit e8434230ce)
2024-01-11 15:50:39 +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
Phoupraw
0e40ff486c Fix FluidStorageUtil#moveWithSound Play Sound (#3431)
* fix play sound

* Update fabric-transfer-api-v1/src/main/java/net/fabricmc/fabric/api/transfer/v1/fluid/FluidStorageUtil.java

* Fix chute testmod

---------

Co-authored-by: modmuss <modmuss50@gmail.com>
(cherry picked from commit 4944b5a5ee)
2023-12-08 15:18:29 +00:00
Technici4n
aaf9c9690c
Fix empty storage iterator returning views that become empty during iteration (#3423) 2023-11-26 13:00:57 +00:00
modmuss50
ed814d36ba 1.20.3-pre1
Just a mappings update :)
2023-11-20 16:36:56 +00:00
Technici4n
d6f4a34e15
Fix log spam with multiple calls to combinedItemApiProvider (#3387) 2023-11-02 10:35:06 +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
modmuss
0e870a06e0
[1.20.3] Make Transfer API stable & remove previously deprecated API. (#3364)
* Remove deprecated transfer APIs.

* Make Transfer API stable.
2023-10-08 13:01:41 +01:00
modmuss50
109a65e5af 1.20.2-pre4 2023-09-13 17:22:35 +01:00
deirn
ceabd7613a Mark SidedStorageBlockEntity's side as nullable (#3281)
(cherry picked from commit 195226a756)
2023-09-03 13:07:10 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50:38 +01:00
modmuss50
f091af96c5 23w33a 2023-08-17 16:51:04 +01:00
Technici4n
cdf060b274
A few transfer API improvements and deprecations (#3204)
* A few transfer API improvements and deprecations

* Forward implementation of deprecated methods
2023-07-18 12:56:03 +01:00
Technici4n
43a3fedd62
Fix default fluid names for non-placeable fluids, clarify Storage iterator lifecycle with modification (#3141)
* Fix default fluid names for non-placeable fluids, clarify Storage iterator lifecycle with modification

* Fix blank variant translation accidentally changing
2023-07-03 13:11:03 +01:00
Juuz
e78ef151ef Improve transfer API debug messages (#3049)
* Add toStrings to Storage, ContainerItemContext and Transaction impls

* StorageUtil: Use crash reports for adding context to errors

* Drop Impl suffix from variant impl toStrings

Since they are the only implementations, it offers no meaningful info for
callers.

* Centralise formatting code, include BE inventory position

* Include amount and resource in all ContainerItemContext.toString impls

* Use crash callables in StorageUtil

* Add crash report to FluidStorageUtil

* Add owning thread to TransactionImpl.toString

* Use thread name in TransactionImpl.toString

The other info clutters the message.

* Fix code style
2023-05-14 15:01:36 +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
b3f2574b16 23w17a 2023-04-26 18:18:06 +01:00
Technici4n
2e629d2646 Fix #3017: ComposterWrapper not always increasing on first insert (#3021) 2023-04-23 13:28:49 +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
Technici4n
f8daae03ea Transfer API: Add slotted storage and non-empty iterator (#2908)
* Transfer API: Add non-empty iterator

* Add SlottedStorage

* Add StorageUtil.extractAny

* Undeprecate ContainerItemContext.withInitial

* Add licenses

* Revert "Undeprecate ContainerItemContext.withInitial"

This reverts commit dcf123eb332ff642cdbd5fda0d8d2237794d93fc.

* Tweaks

* Make SlottedStorage#getSlots return a view, remove useless field, add UnmodifiableView annotations

* Remove useless @inheritDoc

* Fix infinite loop in the tests
2023-04-11 09:51:42 +01:00
modmuss50
158c189089 23w14a 2023-04-05 17:18:33 +01:00
modmuss50
9003cbe9c4 1.19.4-pre2
Just mapping updates
2023-02-27 16:56:40 +00:00
Technici4n
e7471eb7e4
Transfer API v3: Allow null directions, remove deprecated exactView override (#2909) 2023-02-23 10:12:57 +00:00
modmuss50
5da15ca1b9 1.19.4-pre1 2023-02-22 19:56:50 +00:00
modmuss50
e45f7c6532 23w07a 2023-02-15 19:54:58 +00:00
modmuss50
57338cbe24 23w06a 2023-02-08 17:54:34 +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
f1e4495b13
Javadoc and typo fixes (#2782) 2022-12-23 15:20:04 +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
modmuss50
82a27017d9 Update to 1.19.3 (from rc1) 2022-12-11 14:39:06 +00:00
modmuss50
28ac448f9c Update mappings
Use alternative fastutil javadoc link.
2022-11-24 15:46:56 +00:00
Technici4n
1c39312707 Add transfer API Chiseled Bookshelf support (#2685) 2022-11-24 15:06:49 +00:00
modmuss50
faff3b8448
Add automated client smoke tests. (#2678) 2022-11-22 16:49:00 +00:00
Juuz
e1cd40e0d6 Convert flowing fluids to still ones in fluid variants (#2679)
* Convert flowing fluids to still ones in fluid variants

Closes #2665.

* Improve error message

(cherry picked from commit 9d081d647b)
2022-11-22 16:37:55 +00:00
Juuz
48349a3f5f Generate package-info files for all impl and mixin packages (#2615)
* 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>

(cherry picked from commit 0d0f21023d)
2022-11-22 16:35:52 +00:00
Technici4n
5e8d4e2c03 Fix #2657: Transfer API edge case with bad isValid overrides (#2659)
Co-authored-by: modmuss50 <modmuss50@gmail.com>
(cherry picked from commit cd10d4fc03)
2022-11-20 13:47:10 +00:00
Jonathan Coates
4226ecdc12 Fix shulker boxes accepting other shulkers when using a directionless InventoryStorage (#2669)
* 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

(cherry picked from commit c4b89cc4a6)
2022-11-20 13:45:06 +00:00
modmuss50
49abcf7e64 Update mappings 2022-11-16 16:12:51 +00:00
modmuss50
f84bf2d968
22w45a (#2647) 2022-11-10 16:07:38 +00:00
modmuss50
11ba9c3b22
22w43a (#2610)
Co-authored-by: Technici4n <13494793+Technici4n@users.noreply.github.com>
2022-10-26 20:48:38 +01:00
modmuss50
75e98211bd
22w42a 🐫 (#2599)
Co-authored-by: shartte <shartte@users.noreply.github.com>
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-10-22 20:38:33 +01:00
apple502j
93d8cb82e8
Fix many javadoc issues (#2526)
Co-authored-by: Juuz <6596629+Juuxel@users.noreply.github.com>
2022-09-25 14:45:12 +01:00
Technici4n
8f88597368
Transfer API improvements 4 (#2375)
* Transfer API improvements 4

* Actually copy the nbt in `copyOrCreateNbt`

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

* Add SingleFluidStorage.withFixedCapacity

* Remove unneeded iterator() overrides

* Add temporary workaround for bottle sounds

* Address review comments

* Change parameter name from compound to nbt

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
2022-09-11 14:20:47 +01:00
apple502j
83a865928d
Make static-only classes final and unconstructible (#2421)
The following classes have been made final and unconstructible:

- All convention tags classes
- `FluidVariantAttributes`
- `FluidVariantRendering`

The following classes have been made unconstructible:

- `BiomeModifications`
- `ClientEntityEvents`
- `ClientTickEvents`
- `LootTableEvents`
- `FabricDefaultAttributeRegistry`
- `MinecartComparatorLogicRegistry`
- `StorageUtil`

The following classes have been explicitly marked as final. Note that actually extending such class has always been impossible due to missing public constructor:

- `VillagerInteractionRegistries`
- `VillagerPlantableRegistry`
- `ModelHelper`
- `StoragePreconditions`

While the first two are technically breaking changes, there is no actual or observed usage for any of those.
2022-08-06 19:04:11 +01:00