mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-01-08 19:38:57 +01:00
parent
0b8e7b8276
commit
9e7260a152
@ -153,6 +153,15 @@ public abstract class MixinLivingEntity extends Entity {
|
|||||||
return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_14_4) && instance.hasVehicle();
|
return ProtocolTranslator.getTargetVersion().newerThan(ProtocolVersion.v1_14_4) && instance.hasVehicle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Redirect(method = "tickActiveItemStack", at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ItemStack;areItemsEqual(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Z"))
|
||||||
|
private boolean replaceItemStackEqualsCheck(ItemStack left, ItemStack right) {
|
||||||
|
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_14_3)) {
|
||||||
|
return left == right;
|
||||||
|
} else {
|
||||||
|
return ItemStack.areItemsEqual(left, right);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Redirect(method = "travelMidAir", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;isChunkLoaded(Lnet/minecraft/util/math/BlockPos;)Z"))
|
@Redirect(method = "travelMidAir", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;isChunkLoaded(Lnet/minecraft/util/math/BlockPos;)Z"))
|
||||||
private boolean modifyLoadedCheck(World instance, BlockPos blockPos) {
|
private boolean modifyLoadedCheck(World instance, BlockPos blockPos) {
|
||||||
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) {
|
if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user