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