BlockRegistry.oreFor: the ore variant that suits the rock it is placed in, which the platform decides

This commit is contained in:
piexel committed 2026-10-10 18:23:25 +02:00
1 parent d1a1512a6d
commit 4a0d82ea3b
1 file changed
+8
@@ -34,6 +34,14 @@ public interface BlockRegistry {
*/
PaletteSampler palette(PaletteSpec spec, long seed);
/** The ore that suits the {@code rock} it is placed in, which the platform decides: an ore placed in deepslate is its
* deepslate variant, one placed in other rock its ordinary one. {@code ore} itself when it has no variant, and by
* default for a registry that knows none.
*/
default BlockState oreFor(BlockState rock, BlockState ore) {
return ore;
}
boolean hasTrait(BlockState state, BlockTrait trait);
boolean inTag(BlockState state, ResourceId tag);
/** Whether state can attach to the specified face of support, ignoring other neighbors. */