From 4eb402956e5bc05c4954ae9812f2d60024677129 Mon Sep 17 00:00:00 2001 From: Tec Date: Mon, 24 Aug 2020 20:23:33 +0200 Subject: Add some comments --- .../tectech/mechanics/structure/StructureUtility.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java index a02e87308d..2f6998f028 100644 --- a/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java +++ b/src/main/java/com/github/technus/tectech/mechanics/structure/StructureUtility.java @@ -25,6 +25,11 @@ import java.util.function.Supplier; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sHintCasingsTT; import static java.lang.Integer.MIN_VALUE; +/** + * Fluent API for structure checking! + * + * (Just import static this class to have a nice fluent syntax while defining structure definitions) + */ public class StructureUtility { private static final String NICE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz=|!@#$%&()[]{};:<>/?_,.*^'`"; @SuppressWarnings("rawtypes") @@ -430,6 +435,9 @@ public class StructureUtility { } } + /** + * Same as above but ignores target meta id + */ public static IStructureElement ofBlockAnyMeta(Block block, Block defaultBlock, int defaultMeta) { if (block == null || defaultBlock == null) { throw new IllegalArgumentException(); @@ -478,11 +486,17 @@ public class StructureUtility { public static IStructureElement ofBlock(Block block, int meta) { return ofBlock(block, meta, block, meta); } - + + /** + * Same as above but ignores target meta id + */ public static IStructureElement ofBlockAnyMeta(Block block) { return ofBlockAnyMeta(block, block, 0); } + /** + * Same as above but allows to set hint particle render + */ public static IStructureElement ofBlockAnyMeta(Block block,int defaultMeta) { return ofBlockAnyMeta(block, block, defaultMeta); } -- cgit