Temporarily cap to 16 per meta

Will work on implementing automatic overflow handling (Creating a new block when all the meta is taken up)
This commit is contained in:
Nick 2015-11-17 16:30:08 -08:00
parent 9035f800e2
commit 066d3a3f1b
2 changed files with 3 additions and 0 deletions

View file

@ -42,6 +42,7 @@ public class BlockInteger extends Block {
public BlockInteger(Material material, int maxMeta, String propName) {
super(material);
maxMeta = Math.min(maxMeta, 15);
this.maxMeta = maxMeta;
this.metaProp = PropertyInteger.create(propName, 0, maxMeta);

View file

@ -45,6 +45,8 @@ public class BlockString extends Block {
public BlockString(Material material, String[] values, String propName) {
super(material);
values = Arrays.copyOfRange(values, 0, 15);
this.maxMeta = values.length - 1;
this.values = Arrays.asList(values);