mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Formatting for objects
This commit is contained in:
parent
4e18127371
commit
bdb00b8d58
@ -44,15 +44,12 @@ import java.util.Map;
|
|||||||
public class IrisBlockData extends IrisRegistrant {
|
public class IrisBlockData extends IrisRegistrant {
|
||||||
@RegistryListBlockType
|
@RegistryListBlockType
|
||||||
@Required
|
@Required
|
||||||
|
|
||||||
@Desc("The block to use")
|
@Desc("The block to use")
|
||||||
private String block = "air";
|
private String block = "air";
|
||||||
|
|
||||||
@Desc("Debug this block by printing it to the console when it's used")
|
@Desc("Debug this block by printing it to the console when it's used. Must have debug turned on in settings.")
|
||||||
|
|
||||||
private boolean debug = false;
|
private boolean debug = false;
|
||||||
|
|
||||||
|
|
||||||
@Desc("The resource key. Typically Minecraft")
|
@Desc("The resource key. Typically Minecraft")
|
||||||
private String key = "minecraft";
|
private String key = "minecraft";
|
||||||
|
|
||||||
@ -61,11 +58,9 @@ public class IrisBlockData extends IrisRegistrant {
|
|||||||
@Desc("The weight is used when this block data is inside of a list of blockdata. A weight of two is just as if you placed two of the same block data values in the same list making it more common when randomly picked.")
|
@Desc("The weight is used when this block data is inside of a list of blockdata. A weight of two is just as if you placed two of the same block data values in the same list making it more common when randomly picked.")
|
||||||
private int weight = 1;
|
private int weight = 1;
|
||||||
|
|
||||||
|
|
||||||
@Desc("If the block cannot be created on this version, Iris will attempt to use this backup block data instead.")
|
@Desc("If the block cannot be created on this version, Iris will attempt to use this backup block data instead.")
|
||||||
private IrisBlockData backup = null;
|
private IrisBlockData backup = null;
|
||||||
|
|
||||||
|
|
||||||
@Desc("Optional properties for this block data such as 'waterlogged': true")
|
@Desc("Optional properties for this block data such as 'waterlogged': true")
|
||||||
private KMap<String, Object> data = new KMap<>();
|
private KMap<String, Object> data = new KMap<>();
|
||||||
|
|
||||||
@ -122,7 +117,7 @@ public class IrisBlockData extends IrisRegistrant {
|
|||||||
String sx = getKey() + ":" + st.split("\\Q:\\E")[1] + computeProperties(cdata);
|
String sx = getKey() + ":" + st.split("\\Q:\\E")[1] + computeProperties(cdata);
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
Iris.warn("Debug block data " + sx + " (CUSTOM)");
|
Iris.debug("Block Data used " + sx + " (CUSTOM)");
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockData bx = B.get(sx);
|
BlockData bx = B.get(sx);
|
||||||
@ -141,7 +136,7 @@ public class IrisBlockData extends IrisRegistrant {
|
|||||||
b = B.get(ss);
|
b = B.get(ss);
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
Iris.warn("Debug block data " + ss);
|
Iris.debug("Block Data used " + ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b != null) {
|
if (b != null) {
|
||||||
|
@ -39,22 +39,18 @@ public class IrisObjectReplace {
|
|||||||
@ArrayType(min = 1, type = IrisBlockData.class)
|
@ArrayType(min = 1, type = IrisBlockData.class)
|
||||||
@Required
|
@Required
|
||||||
@Desc("Find this block")
|
@Desc("Find this block")
|
||||||
|
|
||||||
private KList<IrisBlockData> find = new KList<>();
|
private KList<IrisBlockData> find = new KList<>();
|
||||||
|
|
||||||
@Required
|
@Required
|
||||||
@Desc("Replace it with this block palette")
|
@Desc("Replace it with this block palette")
|
||||||
|
|
||||||
private IrisMaterialPalette replace = new IrisMaterialPalette();
|
private IrisMaterialPalette replace = new IrisMaterialPalette();
|
||||||
|
|
||||||
@Desc("Exactly match the block data or not")
|
@Desc("Exactly match the block data or not")
|
||||||
|
|
||||||
private boolean exact = false;
|
private boolean exact = false;
|
||||||
|
|
||||||
@MinNumber(0)
|
@MinNumber(0)
|
||||||
@MaxNumber(1)
|
@MaxNumber(1)
|
||||||
@Desc("Modifies the chance the block is replaced")
|
@Desc("Modifies the chance the block is replaced")
|
||||||
|
|
||||||
private float chance = 1;
|
private float chance = 1;
|
||||||
|
|
||||||
private final transient AtomicCache<CNG> replaceGen = new AtomicCache<>();
|
private final transient AtomicCache<CNG> replaceGen = new AtomicCache<>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user