Skip to content

Commit

Permalink
feat: make overworld logs replaceable by malignant veins
Browse files Browse the repository at this point in the history
  • Loading branch information
Elenterius committed Nov 10, 2023
1 parent 8fbe8a5 commit f02208e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ protected void addTags() {
.add(Blocks.CLAY).addTag(BlockTags.SAND).addTag(Tags.Blocks.GRAVEL)
.add(Blocks.SNOW_BLOCK, Blocks.SNOW)
.addTag(BlockTags.LEAVES)
.addTag(BlockTags.OVERWORLD_NATURAL_LOGS)
.add(
Blocks.DIRT, Blocks.COARSE_DIRT, Blocks.PODZOL, Blocks.GRASS_BLOCK, Blocks.DIRT_PATH, Blocks.FARMLAND,
Blocks.ROOTED_DIRT, Blocks.MUDDY_MANGROVE_ROOTS, Blocks.MUD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ public static boolean convert(BlockState state, ServerLevel level, BlockPos pos,
stateBelow = level.getBlockState(posBelow);
replacementBlockState = ModBlocks.PRIMAL_FLESH.get().defaultBlockState();
}
else if (stateBelow.is(ModBlockTags.PRIMORDIAL_ECO_SYSTEM_REPLACEABLE) && stateBelow.is(BlockTags.OVERWORLD_NATURAL_LOGS)) {
if (n < innerBorderThreshold) {
if (state.hasProperty(RotatedPillarBlock.AXIS)) {
Direction.Axis axis = state.getValue(RotatedPillarBlock.AXIS);
replacementBlockState = Blocks.BONE_BLOCK.defaultBlockState().setValue(RotatedPillarBlock.AXIS, axis);
}
else replacementBlockState = ModBlocks.PRIMAL_FLESH_WALL.get().defaultBlockState();
}
else replacementBlockState = ModBlocks.PRIMAL_FLESH.get().defaultBlockState();
}
else {
replacementBlockState = ModBlocks.MALIGNANT_FLESH.get().defaultBlockState();
}
Expand Down

0 comments on commit f02208e

Please sign in to comment.