Fixed a bug with biome essence loot

This commit is contained in:
Adubbz 2014-01-27 22:40:46 +11:00
parent 9cfd40dadf
commit 24b2ee3335
1 changed files with 14 additions and 21 deletions

View File

@ -66,31 +66,24 @@ 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("flippers"), 1, 0), 1, 1, 5));
ItemStack biomeEssence = new ItemStack(BOPItemHelper.get("biomeEssence"));
biomeEssence.setTagCompound(new NBTTagCompound());
BiomeGenBase essenceBiome = null;
while (essenceBiome == null)
for (BiomeGenBase biome : BiomeGenBase.func_150565_n())
{
BiomeGenBase tempBiome = BiomeGenBase.func_150568_d(random.nextInt(BiomeGenBase.func_150565_n().length - 1));
if (tempBiome != null)
if (biome != null)
{
essenceBiome = tempBiome;
ItemStack biomeEssence = new ItemStack(BOPItemHelper.get("biomeEssence"));
biomeEssence.setTagCompound(new NBTTagCompound());
biomeEssence.getTagCompound().setString("biome", biome.biomeName);
desertTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
dungeon.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
jungleTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
mineshaft.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdCorridor.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdCrossing.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdLibrary.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
}
}
biomeEssence.getTagCompound().setString("biome", essenceBiome.biomeName);
desertTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
dungeon.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
jungleTemple.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
mineshaft.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdCorridor.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdCrossing.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
strongholdLibrary.addItem(new WeightedRandomChestContent(biomeEssence, 1, 1, 3));
}
}