Fix recording of client-triggered world events in 1.16+ (fixes #333)

This commit is contained in:
Jonas Herzig
2020-08-16 10:03:55 +02:00
parent 3ba37ab05c
commit 8ffb98efd1

View File

@@ -109,7 +109,11 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
// Same goes for level events (also called effects). E.g. door open, block break, etc. // Same goes for level events (also called effects). E.g. door open, block break, etc.
//#if MC>=11400 //#if MC>=11400
//#if MC>=11600
//$$ @Inject(method = "syncWorldEvent", at = @At("HEAD"))
//#else
@Inject(method = "playLevelEvent", at = @At("HEAD")) @Inject(method = "playLevelEvent", at = @At("HEAD"))
//#endif
private void playLevelEvent (PlayerEntity player, int type, BlockPos pos, int data, CallbackInfo ci) { private void playLevelEvent (PlayerEntity player, int type, BlockPos pos, int data, CallbackInfo ci) {
//#else //#else
//$$ // These are handled in the World class, so we override the method in WorldClient and add our special handling. //$$ // These are handled in the World class, so we override the method in WorldClient and add our special handling.