mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 06:41:08 +00:00
Blockdata backups
This commit is contained in:
@@ -41,6 +41,10 @@ public class IrisBlockData
|
|||||||
@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;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("If the block cannot be created on this version, Iris will attempt to use this backup block data instead.")
|
||||||
|
private IrisBlockData backup = null;
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@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<>();
|
||||||
@@ -81,6 +85,11 @@ public class IrisBlockData
|
|||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(backup != null)
|
||||||
|
{
|
||||||
|
return backup.getBlockData();
|
||||||
|
}
|
||||||
|
|
||||||
return B.get("AIR");
|
return B.get("AIR");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user