From b5b519dc580af9131a9b0d8a017c9aeb889b6592 Mon Sep 17 00:00:00 2001 From: aria1th <35677394+aria1th@users.noreply.github.com> Date: Fri, 21 Apr 2023 00:13:38 +0900 Subject: [PATCH] Fix void damage bug and 7.0.3 --- gradle.properties | 2 +- .../mixin/quasiEssentialClient/ClientPlayerEntityMixin.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index c8ea9619..6dd388a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,6 @@ org.gradle.jvmargs=-Xmx6G loader_version=0.14.7 # Mod Properties - mod_version = 7.0.2 + mod_version = 7.0.3 maven_group = aria1th.extensions archives_base_name = litematica-printer diff --git a/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java b/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java index 26d14574..e370866e 100644 --- a/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java +++ b/src/main/java/io/github/eatmyvenom/litematicin/mixin/quasiEssentialClient/ClientPlayerEntityMixin.java @@ -14,6 +14,7 @@ //$$ import org.jetbrains.annotations.Nullable; //#endif import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Redirect; @@ -23,6 +24,7 @@ @Mixin(value = ClientPlayerEntity.class, priority = 1200) public abstract class ClientPlayerEntityMixin extends PlayerEntity { + //#if MC<11900 public ClientPlayerEntityMixin(World world, BlockPos pos, float yaw, GameProfile gameProfile) { super(world, pos, yaw, gameProfile); @@ -54,7 +56,7 @@ private void onSendPacketVehicle(ClientPlayNetworkHandler clientPlayNetworkHandl return; } clientPlayNetworkHandler.sendPacket(new PlayerMoveC2SPacket.Full( - this.getX(), -999.0D, this.getZ(), + this.getX(), this.hasVehicle()? -999.0D : this.getY(), this.getZ(), FakeAccurateBlockPlacement.fakeYaw, FakeAccurateBlockPlacement.fakePitch, this.isOnGround() @@ -72,7 +74,7 @@ private void onSendPacketFull(ClientPlayNetworkHandler clientPlayNetworkHandler, return; } clientPlayNetworkHandler.sendPacket(new PlayerMoveC2SPacket.Full( - this.getX(), this.getY(), this.getZ(), + this.getX(), this.hasVehicle()? -999.0D : this.getY(), this.getZ(), FakeAccurateBlockPlacement.fakeYaw, FakeAccurateBlockPlacement.fakePitch, this.isOnGround()