Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean Up Survey Tools to be Tag-Only & Include More Blocks #5960

Merged
merged 2 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading