diff --git a/src/main/java/techreborn/blocks/BlockOre.java b/src/main/java/techreborn/blocks/BlockOre.java index 2ebf360f9..e4443eee8 100644 --- a/src/main/java/techreborn/blocks/BlockOre.java +++ b/src/main/java/techreborn/blocks/BlockOre.java @@ -217,6 +217,9 @@ public class BlockOre extends BaseBlock implements ITexturedBlock, IOreNameProvi @Override public IBlockState getStateFromMeta(int meta) { + if(meta > ores.length){ + meta = 0; + } return getBlockState().getBaseState().withProperty(VARIANTS, oreNamesList.get(meta)); } diff --git a/src/main/java/techreborn/blocks/BlockOre2.java b/src/main/java/techreborn/blocks/BlockOre2.java index 074adafa2..0ca0e09ee 100644 --- a/src/main/java/techreborn/blocks/BlockOre2.java +++ b/src/main/java/techreborn/blocks/BlockOre2.java @@ -138,6 +138,9 @@ public class BlockOre2 extends BaseBlock implements ITexturedBlock, IOreNameProv @Override public IBlockState getStateFromMeta(int meta) { + if(meta > ores.length){ + meta = 0; + } return getBlockState().getBaseState().withProperty(VARIANTS, oreNamesList.get(meta)); } diff --git a/src/main/java/techreborn/blocks/BlockRubberSapling.java b/src/main/java/techreborn/blocks/BlockRubberSapling.java index 28bf3add1..0c4796685 100644 --- a/src/main/java/techreborn/blocks/BlockRubberSapling.java +++ b/src/main/java/techreborn/blocks/BlockRubberSapling.java @@ -25,7 +25,7 @@ public class BlockRubberSapling extends BlockSapling setUnlocalizedName("techreborn.rubbersapling"); setCreativeTab(TechRebornCreativeTabMisc.instance); this.setDefaultState(this.getDefaultState().withProperty(STAGE, 0)); - setSoundType(SoundType.PLANT) + setSoundType(SoundType.PLANT); } @Override diff --git a/src/main/java/techreborn/blocks/BlockStorage.java b/src/main/java/techreborn/blocks/BlockStorage.java index 519ba7986..477d08a7c 100644 --- a/src/main/java/techreborn/blocks/BlockStorage.java +++ b/src/main/java/techreborn/blocks/BlockStorage.java @@ -88,6 +88,9 @@ public class BlockStorage extends BaseBlock implements ITexturedBlock @Override public IBlockState getStateFromMeta(int meta) { + if(meta > types.length){ + meta = 0; + } return this.getDefaultState().withProperty(METADATA, meta); } diff --git a/src/main/java/techreborn/blocks/BlockStorage2.java b/src/main/java/techreborn/blocks/BlockStorage2.java index 9e4483f81..3b1556e1f 100644 --- a/src/main/java/techreborn/blocks/BlockStorage2.java +++ b/src/main/java/techreborn/blocks/BlockStorage2.java @@ -85,6 +85,9 @@ public class BlockStorage2 extends BaseBlock implements ITexturedBlock @Override public IBlockState getStateFromMeta(int meta) { + if(meta > types.length){ + meta = 0; + } return this.getDefaultState().withProperty(METADATA, meta); }