From d12ab212a650d69a77c9677217164f4acb7bc8ee Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Sun, 13 Jul 2025 14:52:48 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=92=AC=E6=A3=8D?= =?UTF-8?q?=E5=9B=9E=E6=94=B663=E5=BC=8F=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/vehicle/Type63Entity.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java index b1fa65863..b4be5d145 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Type63Entity.java @@ -6,6 +6,8 @@ import com.atsuishio.superbwarfare.entity.OBBEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ContainerMobileVehicleEntity; import com.atsuishio.superbwarfare.init.ModDamageTypes; import com.atsuishio.superbwarfare.init.ModSounds; +import com.atsuishio.superbwarfare.init.ModTags; +import com.atsuishio.superbwarfare.item.ContainerBlockItem; import com.atsuishio.superbwarfare.tools.CustomExplosion; import com.atsuishio.superbwarfare.tools.OBB; import com.atsuishio.superbwarfare.tools.ParticleTool; @@ -140,6 +142,17 @@ public class Type63Entity extends ContainerMobileVehicleEntity implements GeoEnt player.swing(InteractionHand.MAIN_HAND); } } + + if (player.isShiftKeyDown() && stack.is(ModTags.Items.CROWBAR) && this.getPassengers().isEmpty()) { + ItemStack container = ContainerBlockItem.createInstance(this); + if (!player.addItem(container)) { + player.drop(container, false); + } + this.remove(RemovalReason.DISCARDED); + this.discard(); + return InteractionResult.SUCCESS; + } + return InteractionResult.FAIL; }