From f57c2ce92c07f84eb03da9ffcfd0715bc9e7bb48 Mon Sep 17 00:00:00 2001 From: piexel Date: Thu, 5 Nov 2026 23:00:05 +0100 Subject: [PATCH] Define withProperty for a value the block does not accept BlockRegistry.withProperty returns the state unchanged when the block has no such property or does not accept the value, such as facing=up for a block that only faces sideways. Platforms threw. --- api/src/main/java/com/volmit/block/BlockRegistry.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/src/main/java/com/volmit/block/BlockRegistry.java b/api/src/main/java/com/volmit/block/BlockRegistry.java index 52d0228bf..ccf6e4d94 100644 --- a/api/src/main/java/com/volmit/block/BlockRegistry.java +++ b/api/src/main/java/com/volmit/block/BlockRegistry.java @@ -76,6 +76,8 @@ public interface BlockRegistry { /** {@code state} with the property {@code name} set to {@code value}, as the platform sets it. Unlike * {@link BlockState#withProperty} it keeps a content plugin's block itself ({@link BlockTrait#CUSTOM}): such a block * shares its key with the block it is drawn as, so only the state instance the registry handed out knows it. + * {@code state} itself when the block has no property {@code name} or does not accept {@code value}, such as a + * {@code facing} of {@code up} for a block that only faces sideways. */ BlockState withProperty(BlockState state, String name, String value);