summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/worldGen
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/worldGen')
-rwxr-xr-xsrc/main/java/darkknight/jewelrycraft/worldGen/WorldGenStructure2.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/worldGen/WorldGenStructure2.java b/src/main/java/darkknight/jewelrycraft/worldGen/WorldGenStructure2.java
index 3c304b0..afde2b1 100755
--- a/src/main/java/darkknight/jewelrycraft/worldGen/WorldGenStructure2.java
+++ b/src/main/java/darkknight/jewelrycraft/worldGen/WorldGenStructure2.java
@@ -41,7 +41,9 @@ public class WorldGenStructure2 extends WorldGenStructure {
world.setBlockMetadataWithNotify(x + i, y, z + k, (k == -1) ? 3 : (k == 0) ? (i == 1) ? 0 : 1 : 2, 2);
world.setBlock(x, y, z, Blocks.air);
ItemStack stack = new ItemStack(ItemList.bucket);
- JewelryNBT.addMetal(stack, JewelrycraftUtil.metal.get(rand.nextInt(JewelrycraftUtil.metal.size())));
+ if (JewelrycraftUtil.metal.size() > 0) {
+ JewelryNBT.addMetal(stack, JewelrycraftUtil.metal.get(rand.nextInt(JewelrycraftUtil.metal.size())));
+ }
if (stack != null && JewelryNBT.ingot(stack) != null) {
if (!world.isRemote)
world.func_147480_a(x, y, z, true);