Skip to content

Commit cc2ae94

Browse files
committed
Add more items to moth held target and add a tag for moth breakable blocks, remove redstone torches as moth breakable
1 parent 228bb8e commit cc2ae94

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

common/src/main/java/dev/itsmeow/whisperwoods/entity/EntityMoth.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ protected void customServerAiStep() {
217217
this.yRot += f1;
218218
}
219219
int moths_req = getContainer().getCustomConfiguration().getInt("moths_to_destroy_torch");
220-
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)) {
220+
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)) {
221221
BlockState state = level.getBlockState(this.blockPosition());
222222
Block.dropResources(state, level, this.blockPosition());
223223
level.setBlockAndUpdate(this.blockPosition(), Blocks.AIR.defaultBlockState());

common/src/main/java/dev/itsmeow/whisperwoods/init/ModTags.java

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class ModTags {
1212
public static final class Blocks {
1313
public static final Tag.Named<Block> GHOST_LIGHT = tag("ghost_light");
1414
public static final Tag.Named<Block> WISP_LANTERN = tag("wisp_lantern");
15+
public static final Tag.Named<Block> MOTH_BREAKABLE = tag("moth_breakable");
1516

1617

1718
public static void loadTags() {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"replace": false,
3+
"values": [
4+
"minecraft:torch",
5+
"minecraft:wall_torch",
6+
"minecraft:soul_torch",
7+
"minecraft:soul_wall_torch"
8+
]
9+
}

common/src/main/resources/data/whisperwoods/tags/items/moth_target_held_light_items.json

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
"replace": false,
33
"values": [
44
"minecraft:torch",
5+
"minecraft:soul_torch",
56
"minecraft:lantern",
67
"minecraft:soul_lantern",
8+
"minecraft:end_rod",
9+
"minecraft:glowstone",
10+
"minecraft:jack_o_lantern",
11+
"minecraft:campfire",
12+
"minecraft:soul_campfire",
13+
"minecraft:beacon",
14+
"minecraft:shroomlight",
15+
"minecraft:lava_bucket",
16+
"minecraft:sea_lantern",
717
"#whisperwoods:ghost_light",
818
"#whisperwoods:wisp_lantern"
919
]

0 commit comments

Comments
 (0)