调整C4逻辑和配方

This commit is contained in:
17146 2025-03-21 16:57:22 +08:00
parent 52af5ad762
commit 1cc58756e6
3 changed files with 8 additions and 4 deletions

View file

@ -112,7 +112,11 @@ public class C4Entity extends Projectile implements GeoEntity {
} }
if (!player.getAbilities().instabuild) { if (!player.getAbilities().instabuild) {
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(ModItems.C4_BOMB.get())); ItemStack stack = new ItemStack(ModItems.C4_BOMB.get());
if (this.getEntityData().get(IS_CONTROLLABLE)) {
stack.getOrCreateTag().putBoolean("Control", true);
}
ItemHandlerHelper.giveItemToPlayer(player, stack);
} }
} }

View file

@ -16,6 +16,6 @@
}, },
"result": { "result": {
"item": "superbwarfare:c4_bomb", "item": "superbwarfare:c4_bomb",
"count": 1 "count": 2
} }
} }

View file

@ -11,12 +11,12 @@
"item": "superbwarfare:high_energy_explosives" "item": "superbwarfare:high_energy_explosives"
}, },
"c": { "c": {
"item": "minecraft:redstone_torch" "item": "minecraft:comparator"
} }
}, },
"result": { "result": {
"item": "superbwarfare:c4_bomb", "item": "superbwarfare:c4_bomb",
"count": 1, "count": 2,
"nbt": { "nbt": {
"Control": true "Control": true
} }