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 fcda9f8..1862af5 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.getEntitiesOfClass(EntityMoth.class, this.getBoundingBox()).size() >= moths_req && level.getBlockState(this.blockPosition()).getBlock().is(ModTags.Blocks.MOTH_BREAKABLE) && ModPlatformEvents.mobGrief(this.level, this)) { + if(moths_req != 0 && level.getEntitiesOfClass(EntityMoth.class, this.getBoundingBox()).size() >= moths_req && level.getBlockState(this.blockPosition()).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());