Skip to content

Commit

Permalink
Clean up survey tools to be tag-only & include more
Browse files Browse the repository at this point in the history
  • Loading branch information
voidsong-dragonfly committed Jun 19, 2024
1 parent 0ae40d6 commit 2f6bdeb
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,35 @@ protected void addTags(Provider p_256380_)
.addOptionalTag(new ResourceLocation("dynamictrees", "branches"))
.addOptionalTag(new ResourceLocation("dynamictrees", "leaves"));
tag(IETags.surveyToolTargets)
//Overworld stones
.addTag(Tags.Blocks.STONE)
.add(Blocks.DRIPSTONE_BLOCK)
.add(Blocks.CALCITE)
//Overworld soils
.addTag(BlockTags.DIRT)
.remove(Blocks.MOSS_BLOCK)
.addTag(Tags.Blocks.GRAVEL)
.addTag(Tags.Blocks.SAND)
.add(Blocks.CLAY);
.add(Blocks.CLAY)
//Overworld terracotta
.add(Blocks.TERRACOTTA)
.add(Blocks.WHITE_TERRACOTTA)
.add(Blocks.LIGHT_GRAY_TERRACOTTA)
.add(Blocks.GRAY_TERRACOTTA)
.add(Blocks.BROWN_TERRACOTTA)
.add(Blocks.RED_TERRACOTTA)
.add(Blocks.ORANGE_TERRACOTTA)
.add(Blocks.YELLOW_TERRACOTTA)
//Nether stones
.addTag(Tags.Blocks.NETHERRACK)
.add(Blocks.BASALT)
.add(Blocks.BLACKSTONE)
//Nether soils
.addTag(BlockTags.NYLIUM)
.add(Blocks.SOUL_SAND)
.add(Blocks.SOUL_SOIL)
//End Stones
.add(Blocks.END_STONE);
checkAllRegisteredForBreaking();

for(BlockEntry<?> treatedWood : WoodenDecoration.TREATED_WOOD.values())
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,7 @@ public class SurveyToolsItem extends IEBaseItem
public SurveyToolsItem()
{
super(new Properties().stacksTo(1).defaultDurability(300));
// earthen materials
CAN_USE_ON.add((world, pos) -> world.getBlockState(pos).is(IETags.surveyToolTargets));
// Stone, Diorite, Andesite, etc.
CAN_USE_ON.add((world, pos) -> world.getBlockState(pos).is(Tags.Blocks.STONE));
// Nether materials
CAN_USE_ON.add((world, pos) -> {
BlockState state = world.getBlockState(pos);
Block block = state.getBlock();
return state.is(Tags.Blocks.NETHERRACK)
||block==Blocks.SOUL_SAND
||block==Blocks.SOUL_SOIL
||block==Blocks.BLACKSTONE
||block==Blocks.BASALT
||block==Blocks.CRIMSON_NYLIUM
||block==Blocks.WARPED_NYLIUM;
});
// soft rocks
CAN_USE_ON.add((world, pos) -> {
BlockState state = world.getBlockState(pos);
return state.is(Tags.Blocks.STONE)&&state.getDestroySpeed(world, pos) < 0.5;
});
}

@Override
Expand Down

0 comments on commit 2f6bdeb

Please sign in to comment.