Commit graph

90 commits

Author SHA1 Message Date
apple502j
109a837c6e
24w06a porting fixes (#3578)
* Bump yarn

* Fix TagsLoaded event again

* Resource Loader: internal refactor (name to ID)

* More refactors

* Reset ignoreFallDamageAboveY when using custom elytra

* fix checkstyle
2024-02-09 17:36:06 +00:00
modmuss
03be9f1df2
Port to 24w05a (#3560)
Co-authored-by: Drex <nicknamedrex@gmail.com>
2024-01-31 20:24:57 +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
Kevin
18c9eaa4cb Add Client After Block Break Event (#3367)
* Add clientside after block break event

* Update tests

* Checkstyle, of course

* Update Javadoc

* New Event

* Checkstyle 2 electric boogaloo

* Remove block entity parameter

* Refactor ClientPlayerBlockBreakEvents

* Update Javadoc

(cherry picked from commit 389931eb7a)
2023-12-27 13:01:42 +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
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
modmuss50
13986bf795 23w41a 2023-10-11 16:56:02 +01:00
apple502j
72c64fc180
Fix 23w40a port issues (#3374)
* Fix testmod calling Text#translatable with non-primitive arg

* Fix javadoc in BlockPickInteractionAware

There is no immediate need to change the param type, as the
world can be obtained from `player.getWorld()`.

* Fix unload events not running during reconfiguration
2023-10-11 16:21:23 +01:00
modmuss
af7e9a669d
[1.20.3] Move clientPickBlock APIs to client source set. (#3363)
* Move clientPickBlock APIs to client source set.

* Fix entrypoints

* Dont move impl class to test lol
2023-10-08 13:01:52 +01:00
modmuss50
10292b95f5 23w40a 2023-10-05 09:45:32 +01:00
modmuss50
daef22a2cb 1.20.2-rc1 2023-09-15 15:27:05 +01:00
modmuss50
3bafade3d1 1.20.2-pre2 2023-09-07 15:23:20 +01:00
modmuss50
435112151c 1.20.2-pre1 2023-09-05 16:31:02 +01:00
modmuss
fce67b32cf
23w35a (#3292) 2023-08-31 12:50:38 +01:00
modmuss50
0ba8e9ce03 23w32a 2023-08-09 18:04:04 +01:00
modmuss
86b12645b9
23w31a 2023-08-07 09:09:38 +01:00
modmuss
f4b7e42468
Update to loom 1.3 and use Mod Publish Plugin (#3158)
* Update to loom 1.3

* Fix more 1.3 deprecations

* Opps

* Move to mod publish plugin

* Revert some changes

* Fix some more Gradle deprecations

* Fix names

* Remove extra stuff

* Cleanup
2023-08-02 18:51:21 +01:00
Jonathan Coates
e91849a835
Fix crash when beehive is broken by fake player (#3190)
* Fix crash when beehive is broken by fake player

When a beehive is broken, every nearby bee targets a random player.
However, if there are no nearby players, the game crashes.

This should not occur under normal (vanilla) conditions. However, if a
beehive is broken by a fake player there are no players in range, and so
we see a crash.

* Checkstyle, my beloved

* Remove public modifier

* See see see
2023-07-18 12:54:27 +01:00
modmuss
b3afc78b68
Setup unit tests & format gradle files. (#3073) 2023-05-30 13:07:11 +01:00
qouteall
4014940769 Add an event that fires when client player left-clicks (#3043)
The ClientPreAttackCallback will fire every tick when the attack key is pressed, before vanilla attack handling. If the callback returns true, then the vanilla handling (breaking block, attacking entity, swining hand) will be cancelled. For multiple callbacks, if the former callback returns true, the later callback won't execute.

This event does not consider attack cooldown.
2023-05-30 12:51:54 +01:00
Technici4n
cf56d794ee Add a Fake Player API (#3005) 2023-05-01 13:59:47 +01:00
modmuss50
b3f2574b16 23w17a 2023-04-26 18:18:06 +01:00
modmuss50
a1ccd7bfed 23w04a 2023-01-24 16:59:43 +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
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
apple502j
f1e4495b13
Javadoc and typo fixes (#2782) 2022-12-23 15:20:04 +00:00
Technici4n
422b77fbfd
AttackBlockCallback: creative fix and javadoc update (#2691)
* 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>
2022-11-29 18:04:08 +00:00
modmuss50
689f5e71bc 1.19.3-pre3 2022-11-29 15:59:16 +00:00
modmuss50
c6af733cfb
Cleanup incorrect mixin shadow annotations/access 2022-09-25 14:46:29 +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
modmuss50
aeb40ebeab
Rename and validate Mixin class names. (#2450)
And update loom.
2022-08-15 18:59:19 +01:00
modmuss50
9ff28f4026
Split client only code into its own sourceset. (#2179)
A common source of crashes on modded Minecraft servers comes from modders accidently calling client only code from the client, this PR is another large step towards elimitating that.

This PR has been months in the making and years in the planning, requiring major changes to Loom & Loader. In recent Minecraft versions Mojang has made it easier than ever to cleanly split the jar, going against the status-quo of merging the client and server into one jar.

From the start we have designed Fabric to have a very clear split between client and common (client & server) code. Fabric has always encoraged keeping client only code seprate from the server, this can be seen at a fundamental level with the entrypoints in Loader. Fabric API's have all been designed with this mind.

This PR provides a compile safety net around Fabric API using client only code on the server. Even though there are almost 400 changed files, minimal changes beyond moving the files were required to achieve this in Fabric API, thanks to the effort of all contributors in the past.

These changes should not affect modders or players in anyway, a single "universal" jar is still produced. Im happy to awnswer any questions.
2022-05-21 16:26:46 +01:00
modmuss50
a67d2aa505 22w12a 2022-03-24 20:18:23 +00:00
Player
7463d67c85 22w11a 2022-03-18 00:33:37 +01:00
modmuss50
d7c144a830
Migrate to SLF4j and update loom (#1960)
* Migrate to SLF4j and update loom

* Update loom

* Update to latest loom
2022-01-30 21:37:23 +00:00
Technici4n
bfa23f17d3
Fix AttackBlockCallback on the client not sending a packet to the server (#1872) 2021-12-03 13:34:52 +00:00
Player
3ac43d9577 Revert Mixin compatibilityLevel bump, bump versions 2021-11-17 03:29:11 +01:00
modmuss50
e77d3ea62f 1.18-pre2 & Java 17 2021-11-16 18:41:10 +00:00
modmuss50
b4f4f6cda4 Update Loom and Loader. Cleanup/improve buildscript. 2021-11-12 15:02:54 +00:00
modmuss50
65d505fc8a Bump versions
All of the version need to be bumped due to fabric-api-base being updated, this highlights the need for a better solution.
2021-11-05 17:09:48 +00:00
modmuss50
dc3d5c4769 21w38a 2021-09-23 18:30:50 +01:00
modmuss50
8f2c3e04fb Bump version 2021-09-21 11:41:06 +01:00
shartte
a2c681827d
Compile Fixes (#1729) 2021-09-17 20:06:14 +01:00
modmuss50
5553aff888 21w37a: Compile pass 2021-09-17 18:42:42 +01:00
modmuss50
fc40aa9d88 Bump version 2021-09-01 18:57:12 +01:00
Potatoboy99999
3fb13e467a
Send block entity update packet along with regular block update packet (#1689)
* Send block entity update packet along with regular block update packet

* Fix style
2021-08-31 14:00:06 +01:00
Player
a722d8c028 Bump versions 2021-06-20 16:57:51 +02:00
Frieder Hannenheim
00066f1e8d
Fix ClientPickBlockApplyCallback.EVENT not working as expected Fixes #1493 (#1498)
Co-authored-by: Player <player@player.to>
2021-06-20 14:25:14 +00:00