From 5baedcae430c54af190c76c7c2ed2b53f5c5330c Mon Sep 17 00:00:00 2001 From: Light_Quanta Date: Sat, 28 Dec 2024 02:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E6=89=8B=E5=8A=A8=E6=91=87=E8=BD=AE?= =?UTF-8?q?=E6=A4=85=E6=97=B6=E5=83=8F=E5=88=92=E8=88=B9=E4=B8=80=E6=A0=B7?= =?UTF-8?q?=E6=94=B6=E8=B5=B7=E6=89=8B=E8=87=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atsuishio/superbwarfare/entity/WheelChairEntity.java | 8 +++++++- src/main/resources/META-INF/accesstransformer.cfg | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java index 118053001..2ad6397fe 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/WheelChairEntity.java @@ -9,6 +9,7 @@ import com.atsuishio.superbwarfare.item.ContainerBlockItem; import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.EntityFindUtil; import com.atsuishio.superbwarfare.tools.ParticleTool; +import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ClientGamePacketListener; @@ -221,7 +222,12 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity, serverPlayer.level().playSound(null, serverPlayer.getOnPos(), SoundEvents.BOAT_PADDLE_LAND, SoundSource.PLAYERS, 1, 1); } player.causeFoodExhaustion(0.03F); - // TODO 手动摇轮椅时像划船一样收起物品 + + var localPlayer = Minecraft.getInstance().player; + if (localPlayer != null && player.getUUID().equals(localPlayer.getUUID())) { + localPlayer.handsBusy = true; + } + this.forwardInputDown = false; this.backInputDown = false; } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 90adcd305..04ff8c24d 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -2,4 +2,5 @@ public net.minecraft.server.level.DistanceManager f_140764_ # playerTicketManage public net.minecraft.server.level.DistanceManager$PlayerTicketTracker f_140905_ # viewDistance public net.minecraft.server.level.DistanceManager$PlayerTicketTracker public net.minecraft.client.multiplayer.ClientLevel m_142646_()Lnet/minecraft/world/level/entity/LevelEntityGetter; # getEntities -public net.minecraft.client.renderer.culling.Frustum f_252406_ # matrix \ No newline at end of file +public net.minecraft.client.renderer.culling.Frustum f_252406_ # matrix +public net.minecraft.client.player.LocalPlayer f_108611_ # handsBusy \ No newline at end of file