From c5eb0cd8eb97c5913038f91a5999a43d5241f963 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Tue, 3 Dec 2024 17:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=97=A0=E4=BA=BA=E6=9C=BA?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atsuishio/superbwarfare/entity/model/DroneModel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/model/DroneModel.java b/src/main/java/com/atsuishio/superbwarfare/entity/model/DroneModel.java index 595d3870f..38f484f1a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/model/DroneModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/model/DroneModel.java @@ -6,6 +6,7 @@ import com.atsuishio.superbwarfare.init.ModItems; import com.atsuishio.superbwarfare.tools.EntityFindUtil; import net.minecraft.client.Minecraft; import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import software.bernie.geckolib.core.animatable.model.CoreGeoBone; @@ -60,8 +61,8 @@ public class DroneModel extends GeoModel { float times = (float) (0.5f * Math.min(Minecraft.getInstance().getDeltaFrameTime(), 0.8)); -// rotX = Mth.lerp(0.5f * times, rotX, animatable.getEntityData().get(ROT_X)); -// rotZ = Mth.lerp(0.5f * times, rotZ, animatable.getEntityData().get(ROT_Z)); + rotX = Mth.lerp(0.5f * times, rotX, animatable.getEntityData().get(ROT_X)); + rotZ = Mth.lerp(0.5f * times, rotZ, animatable.getEntityData().get(ROT_Z)); main.setRotZ(rotX); main.setRotX(rotZ); @@ -75,7 +76,7 @@ public class DroneModel extends GeoModel { CoreGeoBone wingBL = getAnimationProcessor().getBone("wingBL"); CoreGeoBone wingBR = getAnimationProcessor().getBone("wingBR"); -// rotation = (float) Mth.lerp(times, rotation, animatable.onGround() ? 0 : 0.08 - 0.1 * animatable.getEntityData().get(MOVE_Y)); + rotation = (float) Mth.lerp(times, rotation, animatable.onGround() ? 0 : 0.08 - 0.1 * animatable.getEntityData().get(MOVE_Y)); wingFL.setRotY(wingFL.getRotY() - rotation); wingFR.setRotY(wingFL.getRotY() - rotation);