3131import net .minecraft .registry .tag .TagKey ;
3232import net .minecraft .util .math .Vec3d ;
3333import net .minecraft .world .World ;
34- import org .objectweb .asm .Opcodes ;
3534import org .spongepowered .asm .mixin .Mixin ;
3635import org .spongepowered .asm .mixin .Shadow ;
3736import org .spongepowered .asm .mixin .injection .At ;
@@ -66,8 +65,8 @@ private double dontApplyLavaMovement(LivingEntity instance, TagKey<Fluid> tagKey
6665 }
6766
6867 @ Redirect (method = "travelInFluid" ,
69- slice = @ Slice (from = @ At (value = "FIELD" , target = "Lnet/minecraft/entity/effect/StatusEffects;DOLPHINS_GRACE:Lnet/minecraft/registry/entry/RegistryEntry;" , opcode = Opcodes . GETSTATIC )),
70- at = @ At (value = "FIELD" , target = "Lnet/minecraft/entity/LivingEntity;horizontalCollision:Z" , ordinal = 0 , opcode = Opcodes . GETFIELD ))
68+ slice = @ Slice (from = @ At (value = "FIELD" , target = "Lnet/minecraft/entity/effect/StatusEffects;DOLPHINS_GRACE:Lnet/minecraft/registry/entry/RegistryEntry;" )),
69+ at = @ At (value = "FIELD" , target = "Lnet/minecraft/entity/LivingEntity;horizontalCollision:Z" , ordinal = 0 ))
7170 private boolean disableClimbing (LivingEntity instance ) {
7271 return ProtocolTranslator .getTargetVersion ().newerThan (ProtocolVersion .v1_13_2 ) && instance .horizontalCollision ;
7372 }
@@ -85,9 +84,7 @@ private boolean modifySwimSprintSpeed(LivingEntity instance) {
8584 @ Redirect (method = "tickMovement" , at = @ At (value = "INVOKE" , target = "Lnet/minecraft/entity/LivingEntity;getFluidHeight(Lnet/minecraft/registry/tag/TagKey;)D" ))
8685 private double redirectFluidHeight (LivingEntity instance , TagKey <Fluid > tagKey ) {
8786 if (ProtocolTranslator .getTargetVersion ().olderThanOrEqualTo (ProtocolVersion .v1_12_2 ) && tagKey == FluidTags .WATER ) {
88- if (instance .getFluidHeight (tagKey ) > 0 ) {
89- return 1 ;
90- }
87+ if (instance .getFluidHeight (tagKey ) > 0 ) return 1 ;
9188 }
9289 return instance .getFluidHeight (tagKey );
9390 }
0 commit comments