From 0492aeee151df8f2078813264ab163e2fcbf3c52 Mon Sep 17 00:00:00 2001 From: baguchan Date: Thu, 30 May 2024 03:46:50 +0900 Subject: [PATCH] 3.5.4 --- gradle.properties | 4 ++-- .../better_with_aquatic/crafting/ModCraftings.java | 1 - .../better_with_aquatic/mixin/EntityPlayerMixin.java | 7 +++++-- .../mixin/client/EntityClientPlayerMPMixin.java | 9 ++------- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gradle.properties b/gradle.properties index 920e8cc..d63bb57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,10 +7,10 @@ bta_version=7.1 loader_version=0.15.6-babric.4-bta # HalpLibe -halplibe_version=3.5.2 +halplibe_version=3.5.4 dragonfly_version=1.4.7-7.1 terrain_api_version=1.4.4-7.1 # Mod -mod_version=3.3.0 +mod_version=3.4.0 mod_group=baguchan mod_name=better_with_aquatic diff --git a/src/main/java/baguchan/better_with_aquatic/crafting/ModCraftings.java b/src/main/java/baguchan/better_with_aquatic/crafting/ModCraftings.java index ab7fd4f..01979f2 100644 --- a/src/main/java/baguchan/better_with_aquatic/crafting/ModCraftings.java +++ b/src/main/java/baguchan/better_with_aquatic/crafting/ModCraftings.java @@ -26,7 +26,6 @@ public void onRecipesReady() { @Override public void initNamespaces() { - RecipeEntrypoint.super.initNamespaces(); RecipeBuilder.initNameSpace(MOD_ID); } } diff --git a/src/main/java/baguchan/better_with_aquatic/mixin/EntityPlayerMixin.java b/src/main/java/baguchan/better_with_aquatic/mixin/EntityPlayerMixin.java index a3d1583..ba2d933 100644 --- a/src/main/java/baguchan/better_with_aquatic/mixin/EntityPlayerMixin.java +++ b/src/main/java/baguchan/better_with_aquatic/mixin/EntityPlayerMixin.java @@ -11,6 +11,7 @@ import net.minecraft.core.util.helper.MathHelper; import net.minecraft.core.world.World; import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -18,6 +19,9 @@ @Mixin(value = EntityPlayer.class, remap = false) public abstract class EntityPlayerMixin extends EntityLiving implements ISwiming { + @Shadow + protected abstract void resetHeight(); + @Unique public boolean swimming; @Unique @@ -38,8 +42,7 @@ public void setSwimming(boolean p_20274_) { this.setPos(this.x, this.y - 1.2, this.z); } else if (!p_20274_ && this.swimming) { this.setSize(0.6F, 1.8F); - - this.heightOffset = 1.62f; + this.resetHeight(); this.setPos(this.x, this.y + 1.2F, this.z); } this.swimming = p_20274_; diff --git a/src/main/java/baguchan/better_with_aquatic/mixin/client/EntityClientPlayerMPMixin.java b/src/main/java/baguchan/better_with_aquatic/mixin/client/EntityClientPlayerMPMixin.java index 8e376e3..df995d9 100644 --- a/src/main/java/baguchan/better_with_aquatic/mixin/client/EntityClientPlayerMPMixin.java +++ b/src/main/java/baguchan/better_with_aquatic/mixin/client/EntityClientPlayerMPMixin.java @@ -7,7 +7,6 @@ import net.minecraft.client.entity.player.EntityPlayerSP; import net.minecraft.client.net.handler.NetClientHandler; import net.minecraft.core.player.Session; -import net.minecraft.core.util.phys.AABB; import net.minecraft.core.world.World; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; @@ -19,11 +18,6 @@ public abstract class EntityClientPlayerMPMixin extends EntityPlayerSP implements ISwiming { @Unique public boolean swimmingOld; - @Unique - public AABB oldAABB; - public float oldOffset; - public float oldWidth; - public float oldHeight; public EntityClientPlayerMPMixin(Minecraft minecraft, World world, Session session, NetClientHandler netclienthandler) { super(minecraft, world, session, 0); @@ -32,9 +26,10 @@ public EntityClientPlayerMPMixin(Minecraft minecraft, World world, Session sessi @Inject(method = "func_4056_N", at = @At("HEAD")) public void func_4056_N(CallbackInfo callbackInfo) { if (this.isSwimming() != this.swimmingOld) { - this.swimmingOld = this.isSwimming(); EntityClientPlayerMP clientPlayerMP = (EntityClientPlayerMP) (Object) this; clientPlayerMP.sendQueue.addToSendQueue(new SwimPacket(this.isSwimming())); + + this.swimmingOld = this.isSwimming(); } }