Opening up hardcoded block/item lists
asiekierka opened this issue ยท 5 comments
- Block.isNaturalDirt/isNaturalStone -> turn them into tags (fabric:natural_dirt, fabric:natural_stone)
- ToolItem effective block lists/mining levels -> ???
Obsidian, Respawn Anchors, and Lodestones are hardcoded as immovable too, despite there being a feature in the Block class that lets you do that. Making it a tag is fairly trivial
Please open specific issues (or even better: PRs), one per issue, if they still exist.
The latter part of this has definitely been addressed by the merge of #460 and FabricToolTags
. The former I am uncertain about, but from poking around in the code I can no longer find any reference to natural dirt or natural stone or actually any reference of the words dirt or stone (except for redstone) inside of the Block
and AbstractBlock
making me believe that this is no longer a concern.
@FabricMC/fabric-triage in agreement?
Feature's isSoil check is still hardcoded for vanilla dirt and is used for all trees, bamboo, forest rock feature, huge mushroom, ice spikes, and lakes.
Carvers do a chunk.getBlockState(mutable3).isOf(Blocks.DIRT)
as well as a this.alwaysCarvableBlocks =
which has dirt and stone.
The isStone is also used for the Forest Rock feature to know when to place the rocks.
And lastly, Buried Treasure structure will keep moving downward forever for modded blocks. It has a hardcoded check for a few vanilla stone blocks and sandstone.
These stuff still would benefit from a dirt and stone tag so people have less places to mixin into for worldgen. And doing a dirt/stone tag would also help intermod compat if they need to get a list of dirt-like or stone-like blocks