diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityMoth.java b/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityMoth.java index 596b8f0..fcda9f8 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityMoth.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityMoth.java @@ -217,7 +217,7 @@ protected void customServerAiStep() { this.setYRot(this.getYRot() + f1); } int moths_req = getContainer().getCustomConfiguration().getInt("moths_to_destroy_torch"); - if(moths_req != 0 && level.getBlockState(this.blockPosition()).getBlock() instanceof TorchBlock && level.getEntitiesOfClass(EntityMoth.class, this.getBoundingBox()).size() >= moths_req && ModPlatformEvents.mobGrief(this.level, this)) { + if(moths_req != 0 && level.getEntitiesOfClass(EntityMoth.class, this.getBoundingBox()).size() >= moths_req && level.getBlockState(this.blockPosition()).getBlock().is(ModTags.Blocks.MOTH_BREAKABLE) && ModPlatformEvents.mobGrief(this.level, this)) { BlockState state = level.getBlockState(this.blockPosition()); Block.dropResources(state, level, this.blockPosition()); level.setBlockAndUpdate(this.blockPosition(), Blocks.AIR.defaultBlockState()); diff --git a/common/src/main/java/dev/itsmeow/whisperwoods/init/ModTags.java b/common/src/main/java/dev/itsmeow/whisperwoods/init/ModTags.java index f8468c9..a3b143c 100644 --- a/common/src/main/java/dev/itsmeow/whisperwoods/init/ModTags.java +++ b/common/src/main/java/dev/itsmeow/whisperwoods/init/ModTags.java @@ -12,6 +12,7 @@ public class ModTags { public static final class Blocks { public static final Tag.Named GHOST_LIGHT = tag("ghost_light"); public static final Tag.Named WISP_LANTERN = tag("wisp_lantern"); + public static final Tag.Named MOTH_BREAKABLE = tag("moth_breakable"); public static void loadTags() { diff --git a/common/src/main/resources/data/whisperwoods/tags/blocks/moth_breakable.json b/common/src/main/resources/data/whisperwoods/tags/blocks/moth_breakable.json new file mode 100644 index 0000000..f094eeb --- /dev/null +++ b/common/src/main/resources/data/whisperwoods/tags/blocks/moth_breakable.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "minecraft:torch", + "minecraft:wall_torch", + "minecraft:soul_torch", + "minecraft:soul_wall_torch" + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/whisperwoods/tags/items/moth_target_held_light_items.json b/common/src/main/resources/data/whisperwoods/tags/items/moth_target_held_light_items.json index 844df5e..cacb739 100644 --- a/common/src/main/resources/data/whisperwoods/tags/items/moth_target_held_light_items.json +++ b/common/src/main/resources/data/whisperwoods/tags/items/moth_target_held_light_items.json @@ -2,8 +2,18 @@ "replace": false, "values": [ "minecraft:torch", + "minecraft:soul_torch", "minecraft:lantern", "minecraft:soul_lantern", + "minecraft:end_rod", + "minecraft:glowstone", + "minecraft:jack_o_lantern", + "minecraft:campfire", + "minecraft:soul_campfire", + "minecraft:beacon", + "minecraft:shroomlight", + "minecraft:lava_bucket", + "minecraft:sea_lantern", "#whisperwoods:ghost_light", "#whisperwoods:wisp_lantern" ]