diff --git a/src/main/java/biomesoplenty/common/core/BOPVanillaCompat.java b/src/main/java/biomesoplenty/common/core/BOPVanillaCompat.java index 541ebc804..f28822233 100644 --- a/src/main/java/biomesoplenty/common/core/BOPVanillaCompat.java +++ b/src/main/java/biomesoplenty/common/core/BOPVanillaCompat.java @@ -78,6 +78,7 @@ public class BOPVanillaCompat biomeEssence.setTagCompound(new NBTTagCompound()); biomeEssence.getTagCompound().setString("biome", biome.biomeName); + biomeEssence.getTagCompound().setInteger("color", biome.color); desertTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1)); dungeon.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1)); diff --git a/src/main/java/biomesoplenty/common/items/ItemBOPBiomeEssence.java b/src/main/java/biomesoplenty/common/items/ItemBOPBiomeEssence.java index 8794aac7d..36ffd7104 100644 --- a/src/main/java/biomesoplenty/common/items/ItemBOPBiomeEssence.java +++ b/src/main/java/biomesoplenty/common/items/ItemBOPBiomeEssence.java @@ -11,6 +11,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagList; import biomesoplenty.BiomesOPlenty; +import biomesoplenty.api.BOPBlockHelper; public class ItemBOPBiomeEssence extends Item { @@ -34,6 +35,21 @@ public class ItemBOPBiomeEssence extends Item } } + @Override + @SideOnly(Side.CLIENT) + public int getColorFromItemStack(ItemStack itemStack, int par2) + { + if (itemStack.hasTagCompound()) + { + if (itemStack.getTagCompound().hasKey("color")) + { + return itemStack.getTagCompound().getInteger("color"); + } + } + + return 16777215; + } + @Override public boolean hasEffect(ItemStack itemStack, int pass) {