Skip to content

Commit

Permalink
Change blocks affected by hail a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebemish committed Dec 23, 2023
1 parent ea6dbfe commit 91823eb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public final class Constants {
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
public static final TagKey<Block> FREEZES_UP = TagKey.create(Registries.BLOCK, id("freezes_up"));
public static final TagKey<Block> BREAKS_WITH_HAIL = TagKey.create(Registries.BLOCK, id("breaks_with_hail"));
public static final TagKey<Block> SAFE_WITH_HAIL = TagKey.create(Registries.BLOCK, id("safe_with_hail"));

public static final ResourceKey<DamageType> HAIL_DAMAGE_TYPE = ResourceKey.create(Registries.DAMAGE_TYPE, id("hail"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private boolean tryFreezeBlock(ServerLevel level, BlockPos toFreeze) {

private static boolean tryHailBreak(ServerLevel level, BlockPos toFreeze) {
var hailEffectState = level.getBlockState(toFreeze);
if (hailEffectState.is(Constants.BREAKS_WITH_HAIL)) {
if (hailEffectState.is(Constants.BREAKS_WITH_HAIL) && !hailEffectState.is(Constants.SAFE_WITH_HAIL)) {
level.destroyBlock(toFreeze, true);
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,20 @@
"id": "#c:buds",
"required": false
},
"#minecraft:flowers",
"#minecraft:small_flowers",
"#minecraft:saplings",
"#minecraft:crops",
"minecraft:pointed_dripstone",
"minecraft:grass",
"minecraft:fern",
"minecraft:dead_bush",
"minecraft:large_fern",
"minecraft:tall_grass",
"minecraft:brown_mushroom",
"minecraft:red_mushroom",
"minecraft:crimson_fungus",
"minecraft:warped_fungus",
"minecraft:crimson_roots",
"minecraft:warped_roots",
"minecraft:weeping_vines",
"minecraft:nether_sprouts",
"minecraft:bamboo",
"minecraft:bamboo_sapling"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"values": [
{
"id": "#hibernalherbs:herbs",
"required": false
}
]
}

0 comments on commit 91823eb

Please sign in to comment.