Skip to content

Commit

Permalink
Clean Up Survey Tools to be Tag-Only & Include More Blocks (#5960)
Browse files Browse the repository at this point in the history
* Always place mixed fluid on bottom. Fixes git #5280

* More survey tool blocks
  • Loading branch information
voidsong-dragonfly authored Jun 20, 2024
1 parent 169c7b7 commit 15d1fb5
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,37 @@ 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)
.add(Blocks.SANDSTONE)
.add(Blocks.RED_SANDSTONE)
//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 15d1fb5

Please sign in to comment.