From 4a0d82ea3ba6be948cfece77214e0062143e3d9f Mon Sep 17 00:00:00 2001 From: piexel Date: Sat, 10 Oct 2026 18:23:25 +0200 Subject: [PATCH] BlockRegistry.oreFor: the ore variant that suits the rock it is placed in, which the platform decides --- src/main/java/com/volmit/block/BlockRegistry.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/volmit/block/BlockRegistry.java b/src/main/java/com/volmit/block/BlockRegistry.java index 1bdd429c6..26e5aedc4 100644 --- a/src/main/java/com/volmit/block/BlockRegistry.java +++ b/src/main/java/com/volmit/block/BlockRegistry.java @@ -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. */