Fix world-compatibility for new azulejos

This commit is contained in:
Vincent Lee committed 2017-09-25 15:38:52 -05:00
1 parent 8c8b41ce83
commit d21df2aa21
2 files changed
+8 -6

No files matched your search

@@ -13,7 +13,13 @@ import net.minecraft.util.IStringSerializable;
import java.util.Locale;
public enum CustomBrickVariant implements IStringSerializable {
/* Azulejos 0, 13, 14, and 15 replaced the old bricks
They are here at the top because putting them at the bottom while deleting the bricks
would shift the variants of azulejos in older worlds.*/
AZULEJO_0,
AZULEJO_13,
AZULEJO_14,
AZULEJO_15,
AZULEJO_1,
AZULEJO_2,
AZULEJO_3,
@@ -25,10 +31,7 @@ public enum CustomBrickVariant implements IStringSerializable {
AZULEJO_9,
AZULEJO_10,
AZULEJO_11,
AZULEJO_12,
AZULEJO_13,
AZULEJO_14,
AZULEJO_15;
AZULEJO_12;
@Override
public String getName() {
@@ -83,8 +83,7 @@ public class BlockCustomBrick extends BlockMod implements ILexiconable {
@Override
public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) {
CustomBrickVariant variant = world.getBlockState(pos).getValue(BotaniaStateProps.CUSTOMBRICK_VARIANT);
return variant.getName().contains("azulejo") ? LexiconData.azulejo : LexiconData.decorativeBlocks;
return LexiconData.azulejo;
}
@SideOnly(Side.CLIENT)