mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-02 18:39:16 +01:00
Fixed entity movement fix
This commit is contained in:
parent
e00a9816b1
commit
ba9abdbb23
@ -86,10 +86,12 @@ public abstract class MixinEntity implements IEntity {
|
|||||||
@Unique
|
@Unique
|
||||||
private boolean viaFabricPlus$isInLoadedChunkAndShouldTick;
|
private boolean viaFabricPlus$isInLoadedChunkAndShouldTick;
|
||||||
|
|
||||||
@Redirect(method = "move", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/Vec3d;lengthSquared()D"))
|
@Redirect(method = "move", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/Vec3d;lengthSquared()D", ordinal = 1), slice = @Slice(
|
||||||
|
from = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;adjustMovementForCollisions(Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/Vec3d;")
|
||||||
|
))
|
||||||
private double allowSmallValues(Vec3d instance) {
|
private double allowSmallValues(Vec3d instance) {
|
||||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) {
|
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_21)) {
|
||||||
return 0;
|
return Double.MAX_VALUE;
|
||||||
} else {
|
} else {
|
||||||
return instance.lengthSquared();
|
return instance.lengthSquared();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user