PatchworkMC / patchwork-api

An attempt to reimplement the Minecraft Forge API on Fabric
GNU Lesser General Public License v2.1
282 stars 48 forks source link

Patchwork API incompatible with Fabric API versions ≥0.15.0 #148

Closed GammaWhiskey closed 4 years ago

GammaWhiskey commented 4 years ago

As of posting, this incompatibility refers to Fabric API v0.15.0 and v0.15.1 for 1.14.4. Tested against both the release v0.7.0 and commit 494fd271bd27556595545e4f34ecb013127701d3.

Crash log: https://pastebin.com/GxWdzDB1

The problem appears to be a redirect conflict between the new Fabric Lifecycle Events V1 and Patchwork API.

For reference, here are the conflicting redirects (I believe):

https://github.com/FabricMC/fabric/blob/3673fdf545ad946a8a1cba5e6c5fcdfa88d50900/fabric-lifecycle-events-v1/src/main/java/net/fabricmc/fabric/mixin/event/lifecycle/MinecraftServerMixin.java#L94

https://github.com/PatchworkMC/patchwork-api/blob/494fd271bd27556595545e4f34ecb013127701d3/patchwork-events-world/src/main/java/net/patchworkmc/mixin/event/world/MixinMinecraftServer.java#L80

coderbot16 commented 4 years ago

Nice catch! Seems like it would be possible to implement our hooks using the new lifecycle events, avoiding the conflict.

kitlith commented 4 years ago

As the person who first implemented the patchwork version of the Redirect, my only minor gripe with this is that the overworld will have its event fired before e.g. the world border, setting the main world, etc. (forge does everything in the final loop) but that is easily worked around if necessary. Working on a fix for this now.

i509VCB commented 4 years ago

rofl I didn't expect Patchwork to break there, but the event is in fabric api now