From 4b94ea626763c28f95510c3545e58a320991d170 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Fri, 21 Mar 2025 15:39:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=B7=E7=88=86=E5=99=A8?= =?UTF-8?q?=E9=85=8D=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/C4Entity.java | 2 +- .../recipes/detonator_crafting.json | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/data/superbwarfare/recipes/detonator_crafting.json diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java index 20a397a06..b1d493f71 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/C4Entity.java @@ -279,7 +279,7 @@ public class C4Entity extends Projectile implements GeoEntity { protected void onHitEntity(EntityHitResult pResult) { super.onHitEntity(pResult); Entity entity = pResult.getEntity(); - if (entity == this.getVehicle()) return; + if (tickCount < 2 && entity == this.getVehicle()) return; this.entityData.set(TARGET_UUID, entity.getStringUUID()); this.onEntity = true; this.setDeltaMovement(this.getDeltaMovement().multiply(0, 0, 0)); diff --git a/src/main/resources/data/superbwarfare/recipes/detonator_crafting.json b/src/main/resources/data/superbwarfare/recipes/detonator_crafting.json new file mode 100644 index 000000000..84676cf6e --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/detonator_crafting.json @@ -0,0 +1,20 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "a", + "b" + ], + "key": { + "a": { + "item": "minecraft:redstone_torch" + }, + "b": { + "item": "minecraft:stone_button" + } + }, + "result": { + "item": "superbwarfare:detonator", + "count": 1 + } +} \ No newline at end of file