Blockdata backups

This commit is contained in:
Daniel Mills
2020-09-10 00:17:13 -04:00
parent eb0de84ce3
commit b0ee9b27a1
@@ -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");
}); });
} }