Fixed up biome essence colouring
This commit is contained in:
commit
80b1be1bde
|
@ -49,6 +49,7 @@ public class BOPVanillaCompat
|
||||||
ChestGenHooks strongholdCrossing = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING);
|
ChestGenHooks strongholdCrossing = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CROSSING);
|
||||||
ChestGenHooks strongholdLibrary = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY);
|
ChestGenHooks strongholdLibrary = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_LIBRARY);
|
||||||
ChestGenHooks village = ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH);
|
ChestGenHooks village = ChestGenHooks.getInfo(ChestGenHooks.VILLAGE_BLACKSMITH);
|
||||||
|
ChestGenHooks bonusChest = ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST);
|
||||||
|
|
||||||
if (BOPConfigurationMisc.dungeonLoot == true)
|
if (BOPConfigurationMisc.dungeonLoot == true)
|
||||||
{
|
{
|
||||||
|
@ -66,6 +67,9 @@ public class BOPVanillaCompat
|
||||||
village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("wadingBoots"), 1, 0), 1, 1, 5));
|
village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("wadingBoots"), 1, 0), 1, 1, 5));
|
||||||
village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("flippers"), 1, 0), 1, 1, 5));
|
village.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("flippers"), 1, 0), 1, 1, 5));
|
||||||
|
|
||||||
|
bonusChest.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("wadingBoots"), 1, 0), 1, 1, 5));
|
||||||
|
bonusChest.addItem(new WeightedRandomChestContent(new ItemStack(BOPItemHelper.get("flippers"), 1, 0), 1, 1, 5));
|
||||||
|
|
||||||
for (BiomeGenBase biome : BiomeGenBase.func_150565_n())
|
for (BiomeGenBase biome : BiomeGenBase.func_150565_n())
|
||||||
{
|
{
|
||||||
if (biome != null)
|
if (biome != null)
|
||||||
|
@ -73,15 +77,17 @@ public class BOPVanillaCompat
|
||||||
ItemStack biomeEssence = new ItemStack(BOPItemHelper.get("biomeEssence"));
|
ItemStack biomeEssence = new ItemStack(BOPItemHelper.get("biomeEssence"));
|
||||||
|
|
||||||
biomeEssence.setTagCompound(new NBTTagCompound());
|
biomeEssence.setTagCompound(new NBTTagCompound());
|
||||||
|
|
||||||
biomeEssence.getTagCompound().setInteger("biomeID", biome.biomeID);
|
biomeEssence.getTagCompound().setInteger("biomeID", biome.biomeID);
|
||||||
|
|
||||||
desertTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
desertTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
dungeon.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
dungeon.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
jungleTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
jungleTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 2));
|
||||||
mineshaft.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
mineshaft.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
strongholdCorridor.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
strongholdCorridor.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
strongholdCrossing.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
strongholdCrossing.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
strongholdLibrary.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
strongholdLibrary.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
|
||||||
|
bonusChest.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import biomesoplenty.BiomesOPlenty;
|
import biomesoplenty.BiomesOPlenty;
|
||||||
|
import biomesoplenty.api.BOPBlockHelper;
|
||||||
|
|
||||||
public class ItemBOPBiomeEssence extends Item
|
public class ItemBOPBiomeEssence extends Item
|
||||||
{
|
{
|
||||||
|
@ -55,6 +56,26 @@ public class ItemBOPBiomeEssence extends Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getColorFromItemStack(ItemStack itemStack, int par2)
|
||||||
|
{
|
||||||
|
if (itemStack.hasTagCompound())
|
||||||
|
{
|
||||||
|
if (itemStack.getTagCompound().hasKey("biomeID"))
|
||||||
|
{
|
||||||
|
BiomeGenBase biome = BiomeGenBase.func_150565_n()[itemStack.getTagCompound().getInteger("biomeID")];
|
||||||
|
|
||||||
|
if (biome != null)
|
||||||
|
{
|
||||||
|
return biome.color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 16777215;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasEffect(ItemStack itemStack, int pass)
|
public boolean hasEffect(ItemStack itemStack, int pass)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue