Commit graph

1792 commits

Author SHA1 Message Date
modmuss50
4879dc610a Bump version 2025-03-16 13:34:10 +00:00
Cassian Godsted
def88e3a72
Change Creative Buttons Texture () ()
Co-authored-by: Matthew Periut <matthewperiut@gmail.com>
2025-03-16 13:32:39 +00:00
modmuss50
cb2ae4691b Bump version 2025-02-20 17:54:50 +00:00
TelepathicGrunt
9465b644d2
Sync remaining c tags with NeoForge ()
* Add more chest tags

* adjust temperate biome tag

* More Cobblestone tags

* end stones tag

* Gravels tag

* Netherracks tag

* Add all ores tags for consistency

* Ore rates, ore in ground, and ore bearing tags added

* Added sands tags

* added bones tag

* Added eggs tag

* Added feathers tag

* Added gunpowders tag

* Added mushrooms tag

* Added nether stars tag

* Added seeds tags

* Added fence and fence gate tags

* Added nether and end empty category tags

* Added lush biome tag

* Added magical tag

* Added rare biome tag

* Added plateau tag

* added spooky biome tag

* Added sandy tag

* Fixed checkstyle issues

* Run datagen

* more javadoc and fixed biomes in temperature tag

* fixed typo in biome temperature tag javadoc

* attempt at potion tag javadoc

* Add bottled potion subtag

* Datagen bottled potion and biome temperature fix

* Improved potion javadoc more

* Changed potion verb to noun

* Improve potion javadoc to mention data component

* special exception for certain biome tag

* checkstyle

* backport adjustments and egg PR
2025-02-20 17:52:53 +00:00
modmuss50
d168b8add5 Bump version 2025-01-21 19:01:33 +00:00
modmuss
9ed317f52b Fix syncing block entity attachments on load. ()
* Fix syncing block entity attachments on load.

Closes 

* Return success

(cherry picked from commit 7e31339eff)

(cherry picked from commit 8212661064)
2025-01-21 18:50:06 +00:00
modmuss50
5ca99b905c Bump version 2024-12-30 13:21:21 +00:00
Salandora
248df81c7e
[1.21.1-1.21.4] Custom Ingredients sync fix ()
* Fix customIngredients sync ()

* Add client side test for custom ingredients sync

* Fixed styling issues and missing license header

* Applied requested changes and styling fixes
2024-12-30 13:11:34 +00:00
Joseph T. McQuigg
d527f9fdd9 Check to make sure Feature isn't present before adding it ()
(cherry picked from commit b1c29d8eb4)
(cherry picked from commit add2a486e4)
2024-12-30 13:11:03 +00:00
Bruno Ploumhans
c24bd9945d Fix NPE in WaterPotionStorage#isWaterPotion ()
* Fix NPE in WaterPotionStorage#isWaterPotion

* Make checkstyle happy

(cherry picked from commit efa825c9d7)
2024-12-30 13:09:45 +00:00
modmuss50
96c409c264 Bump version 2024-11-25 18:27:28 +00:00
Daniel Orr
45b96997d7 Add transitive access wideners for tracked data related creator entity methods ()
* feat: transitive access wideners for display entity fields

* fix: change display transitive access widener collector to check for dataTracker accesses

* fix: incorrect method names & comments

* refactor: move getMethodParameterCount to use existing lib

* feat: InteractionEntity methods & missing method from DisplayEntity

(cherry picked from commit 54a41b1cc9)
2024-11-25 18:16:32 +00:00
modmuss
34f5d914f6 Add RegistryEntryAddedCallback.allEntries ()
* Add RegistryEntryAddedCallback.allEntries

* Pass a RegistryEntry.Reference

* Remove some temp test code

* Add note about recursion.

(cherry picked from commit aa5b2ca19e)
(cherry picked from commit 2758bfbf66)
2024-11-25 18:15:32 +00:00
modmuss50
04237528b9 Bump version 2024-11-18 18:34:02 +00:00
modmuss
da19b51ab6 Provide a RegistryByteBuf for attachment syncing ()
* Provide a RegistryByteBuf for attachment syncing

* None breaking?

* Slight improvement

* Test syncing an item stack

* Jdoc fix

* Jdoc fix

(cherry picked from commit 9aea556b88)
(cherry picked from commit dbad41f1cb)
2024-11-18 18:15:50 +00:00
modmuss50
c32692638c Bump version 2024-11-12 18:40:21 +00:00
Fabric Bot
e60e56d4cb
Translation updates () 2024-11-12 18:16:29 +00:00
fishshi
01d9a51c61
Add AFTER_CLIENT_WORLD_CHANGE ()
* add AFTER_CLIENT_WORLD_CHANGE

* fix

* move

* add description to README and change class to final with a private constructor

* revert the event name
2024-11-12 18:16:14 +00:00
Syst3ms
8e331c5709
Data Attachment Sync API ()
Completes the data attachment API with client-server syncing capabilities.

## Motivation

The existing API works great for attaching data to game objects, be they serverside or clientside, but lacks any ability to synchronize between the two.

A mod that wants to add a "thirst" mechanic can easily do so on the server side by attaching an integer to every player. However, the mod may also want to use this information to render additional HUD elements on the client. Currently, informing the client of this data can only be done manually, which is cumbersome, error-prone, and is much better-suited as an API feature.

## API Changes

The API doesn't change a lot (at least compared to the implementation), with a few new methods and one new class.

One new method has been added to `AttachmentRegistry.Builder`, namely `syncWith`. It declares that an attachment type may be synchronized with some clients, and takes a `PacketCodec` to encode attachment data over the network, as well as an element of the new `AttachmentSyncPredicate` interface.

This interface extends `BiPredicate<AttachmentTarget, ServerPlayerEntity>` to allow for user-defined predicates, and provides some common presets:
* `all()`: attachment data will be synchronized with all clients (that track the target).
* `targetOnly()`: attachment data will only be synchronized with the target it is attached to, when it is a player. If the target is not a player, it won't be synchronized with any client.
* `allButTarget()`: reverse of the above. For non-player targets, attachment data will be synchronized with all clients.

**NOTE**: for a user-defined condition, whether attachment data is synchronized with a client can change at runtime (e.g. "sync only with operators" when a player changes operator status). A specialized method to "refresh" data was considered, but in the end discarded due to complexity. It falls to individual mods to handle these edge cases.

AttachmentType also gets one new `isSynced` method to know whether a given attachment type can be synced.

## Usage

Here is how one could register an attachment for a "thirst" meter like mentioned above.
```java
public static final AttachmentType<Integer> THIRST = AttachmentRegistry.<Integer>builder() 
    .initializer(() -> 20) // start with a default value like hunger
    .persistent(Codec.INT) // persist across restarts
    .syncWith(PacketCodecs.VAR_INT.cast(), AttachmentSyncPredicate.targetOnly()) // only the player's own client needs the value for rendering
    .buildAndRegister(Identifier.of("modid", "thirst"));
```
2024-11-12 18:16:04 +00:00
modmuss50
80c4fadaf8 Bump version 2024-10-26 17:08:54 +01:00
apple502j
5b5275af51 Fix overriding vanilla translations ()
(cherry picked from commit e82f21f7e9)
2024-10-26 15:55:27 +01:00
Jason Penilla
0f6c53cd2e Add ServerChunkEvents.Generate ()
* Add a new chunk generate event, fired alongside the chunk load event when a chunk is first upgraded to full status

* fix style

* Add logging test for generate event

After creating an SP world and waiting for all nearby chunks to generate (logging to stop), closing the SP world and opening it again should not log any fresh generation. Moving to an unexplored area will start logging again.

(cherry picked from commit 4402f4ee73)
2024-10-26 15:55:25 +01:00
SemmieDev
be1ed2d72d Remove LevelProperties check ()
(cherry picked from commit 6c3b5d4971)
2024-10-26 15:55:20 +01:00
Fabric Bot
7fd48375f5
New Crowdin updates ()
* New translations en_us.json (German)

* New translations en_us.json (Italian)

* New translations en_us.json (Russian)

* New translations en_us.json (Polish)

* New translations en_us.json (Russian)

* New translations en_us.json (Korean)
2024-10-26 15:53:18 +01:00
forgetmenot13579
e49211d8c6
AttachmentType Registration Enhancements ()
* - Add new method AttachmentRegistry#create that allows configuration of the registered attachment type with a builder.
- Migrate existing creation methods to use the new one under the hood for consistency.
- Moves all null checking from AttachmentRegistry to AttachmentRegistryImpl.BuilderImpl (most of them happened there as well already and were thus redundant).

* - Adds the ability to initialize an AttachmentType with only a path, substituting the mod ID of the registrant via an entrypoint.

* - Add registration safety checks

* - Add missing copyright header

* - Remove lazy entrypoint initialization of attachment types.

* - Import fixes

* - Update javadoc.

* - Use expression lambdas.

* - Fix style checks

* - More style fixes

* - Fix line endings

* - Move WheelInfo and initialization to test package
- Deprecate AttachmentRegistry#builder
- Update existing tests to use #create rather than #builder
2024-10-26 15:53:08 +01:00
Reece Mackie
6823f7cd48
fix: Add operator tab to common group list and filter for visible tabs in getPageCount. () 2024-10-21 09:38:25 +01:00
modmuss50
b6ed6c19bb Bump version 2024-10-15 15:21:08 +01:00
modmuss50
95bead5fff Fix tests 2024-10-15 14:41:59 +01:00
modmuss50
2986a625c7 Fix build after bad merge 2024-10-15 14:16:00 +01:00
BasiqueEvangelist
c0bdb897d1 Add support for Item-containing Items ()
* first steps toward container item support

* add bundle support

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

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

* address reviews + TIL ContainerItemContext#find exists

* address reviews of bundle code

---------

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

(cherry picked from commit 4054068033)
2024-10-15 13:27:26 +01:00
IThundxr
83a9d3130d
Add Stripped Logs and Stripped Woods Tags ()
* Add Stripped Logs and Stripped Woods Tags

* run spotless

* Address review
2024-10-15 13:23:42 +01:00
TelepathicGrunt
dde8f6bb9c
Add more c fluid tags ()
* Add more `c` fluid tags

* fixed a javadoc

* Cleaned up javadoc

* checkstyle

* removed space

* Adjust experience rate to more reasonable amount

* explain perfect extractions

* fixed javadoc
2024-10-15 13:16:22 +01:00
Fabric Bot
487ccc21c8
New Crowdin updates ()
* New translations en_us.json (Polish)

* New translations en_us.json (Italian)

* New translations en_us.json (German)

* New translations en_us.json (Japanese)
2024-10-15 13:16:13 +01:00
Joseph T. McQuigg
29d3a7035e
Add Pie Item Tag c:foods/pie ()
Co-authored-by: modmuss <modmuss50@gmail.com>
2024-10-15 13:16:05 +01:00
modmuss50
3b9245a976 Bump version 2024-09-23 19:28:58 +01:00
modmuss50
d831205f6d Fix cherry pick issues 2024-09-23 19:19:42 +01:00
BasiqueEvangelist
5253a6d2b8 Add ItemVariant#withComponentChanges and FluidVariant#withComponentChanges ()
* add ItemVariant#withChanges and FluidVariant#withChanges

* withChanges -> withComponentChanges

* add TransferVariant#withComponentChanges

* make TransferVariant#withComponentChanges throw

(cherry picked from commit 1d5c24337f)
2024-09-23 18:48:31 +01:00
Joseph Burton
c7469b213f
Add access to ClientConfigurationNetworkHandler in context () 2024-09-23 18:47:02 +01:00
TelepathicGrunt
9d22c5fde0
Create c:obsidians block and item tag ()
* Create `c:obsidians`

* Add obsidians subtags
2024-09-23 18:46:54 +01:00
Fabric Bot
9d3173d557
New Crowdin updates ()
* New translations en_us.json (German)

* New translations en_us.json (Turkish)

* New translations en_us.json (Chinese Simplified)

* New translations en_us.json (Polish)

* New translations en_us.json (Czech)

* New translations en_us.json (Japanese)
2024-09-23 18:46:34 +01:00
TheDeathlyCow
d5debaed0e
Modify Enchantment and Fabric Component Map Builder Extensions ()
* modify effects event

* give impaling fire aspect

* add fabric component map builder

* change interface name to match event

* gametests for weird impaling enchantment

* fix checkstyle issues

* fabric map builder javadoc

* modify effects javadoc

* fix checkstyle issues

* prefer extension methods over add

* add enchantment source

* fix missing asterisk on fabricitemstack javadoc

* switch to enchantment builder

* fix effects list

* fix checkstyle

* add note on exclusive set to javadoc

* add fabric component builder extensions to default component testmod

* remove threadlocal usage from mixin

* remove modid prefix from accessors

* remove unused import

* fix recursive invoker

* add test to automatically check modified item name
2024-09-23 18:46:27 +01:00
modmuss50
e521378444 Bump version 2024-09-10 13:27:30 +01:00
modmuss
427f7cbfec Use unix line endings on all files ()
(cherry picked from commit f83d9a4a4d)
2024-09-10 13:17:44 +01:00
modmuss
d38f898f77 Add TransferVariant.getComponentMap() ()
* Add TransferVariant.getComponentMap()

* used the cached stack

* Even better

(cherry picked from commit 0771530439)
2024-09-10 13:17:38 +01:00
TelepathicGrunt
405385578e
Add missing minecraft:enchantable/vanishing to c:enchantables () 2024-09-10 13:15:33 +01:00
Fabric Bot
aa34100ae2
New Crowdin updates ()
* New translations en_us.json (Portuguese, Brazilian)

* New translations en_us.json (Malay)

* New translations en_us.json (Korean)

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Malay (Jawi))

* New translations en_us.json (Polish)

* New translations en_us.json (Portuguese, Brazilian)
2024-09-10 13:15:21 +01:00
TelepathicGrunt
3d2379b573
Add c:animal_foods tag ()
* Add `c:animal_foods` tag

* checkstyle

* Spotless

* Add to lang generator

* Actually use the generated lang file

---------

Co-authored-by: modmuss50 <modmuss50@gmail.com>
2024-09-10 13:15:13 +01:00
modmuss50
f054fb578a Bump version 2024-08-26 12:11:37 +01:00
TheDeathlyCow
2122d828f0
After Damage Event ()
* after damage event

* add after damage event to testmod

* remove amount > 0 check to capture shield blocking

* add javadoc

* dont fire event if killed

* clarify javadoc a bit more

* fix checkstyle issue

* fix other checkstyle issues lol

* rename damageDealt to baseDamageTaken
2024-08-26 12:02:20 +01:00
AshyBoxy
3fc0e552c4
Dont invoke ItemGroupEvents.MODIFY_ENTRIES_ALL for the OP tab, when the OP tab is disabled () 2024-08-26 12:02:11 +01:00