mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-02 18:39:16 +01:00
Allow climbing while flying in <= 1.21.3
This commit is contained in:
parent
9c346cae39
commit
228297d65a
@ -34,7 +34,6 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* TODO | Port 1.21.4
|
* TODO | Port 1.21.4
|
||||||
* - PlayerEntity#isClimbing override
|
|
||||||
* - PlayerEntity#tick -> hasVehicle check at the top
|
* - PlayerEntity#tick -> hasVehicle check at the top
|
||||||
* - Entity#move
|
* - Entity#move
|
||||||
* - LivingEntity#baseTick
|
* - LivingEntity#baseTick
|
||||||
|
@ -82,6 +82,13 @@ public abstract class MixinPlayerEntity extends LivingEntity {
|
|||||||
super(entityType, world);
|
super(entityType, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject(method = "isClimbing", at = @At("HEAD"), cancellable = true)
|
||||||
|
public void allowClimbingWhileFlying(CallbackInfoReturnable<Boolean> cir) {
|
||||||
|
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21_2)) {
|
||||||
|
cir.setReturnValue(super.isClimbing());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Inject(method = "isLoaded", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "isLoaded", at = @At("HEAD"), cancellable = true)
|
||||||
public void alwaysLoadPlayer(CallbackInfoReturnable<Boolean> cir) {
|
public void alwaysLoadPlayer(CallbackInfoReturnable<Boolean> cir) {
|
||||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21_2)) {
|
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21_2)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user