From 27b6d250ba6005bfa9cdd9d291e0656f5e02fa65 Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Wed, 21 May 2014 18:48:35 +0300 Subject: Liquids! --- src/main/java/darkknight/jewelrycraft/worldGen/Generation.java | 4 +++- .../darkknight/jewelrycraft/worldGen/village/ComponentJewelry.java | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/darkknight/jewelrycraft/worldGen') diff --git a/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java b/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java index f484c0b..9ff79ab 100644 --- a/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java +++ b/src/main/java/darkknight/jewelrycraft/worldGen/Generation.java @@ -2,6 +2,7 @@ package darkknight.jewelrycraft.worldGen; import java.util.Random; +import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; @@ -37,7 +38,8 @@ public class Generation implements IWorldGenerator int y = 5 + random.nextInt(4); int z = j + random.nextInt(16); world.setBlock(x, y, z, BlockList.shadowOre); - if(random.nextInt(3) == 0) world.setBlock(x + random.nextInt(2), y + random.nextInt(1), z + random.nextInt(2), BlockList.shadowOre); + int randX = random.nextInt(2), randY = random.nextInt(1), randZ = random.nextInt(2); + if(random.nextInt(3) == 0 && world.getBlock(x + randX, y + randY, z + randZ) == Blocks.stone) world.setBlock(x + randX, y + randY, z + randZ, BlockList.shadowOre); } } diff --git a/src/main/java/darkknight/jewelrycraft/worldGen/village/ComponentJewelry.java b/src/main/java/darkknight/jewelrycraft/worldGen/village/ComponentJewelry.java index 6924940..0a79b79 100644 --- a/src/main/java/darkknight/jewelrycraft/worldGen/village/ComponentJewelry.java +++ b/src/main/java/darkknight/jewelrycraft/worldGen/village/ComponentJewelry.java @@ -301,6 +301,7 @@ public class ComponentJewelry extends StructureVillagePieces.House1 { smelter.moltenMetal = JewelrycraftUtil.metal.get(random.nextInt(JewelrycraftUtil.metal.size())); smelter.hasMoltenMetal = true; + smelter.quantity = 1f; } } @@ -320,8 +321,11 @@ public class ComponentJewelry extends StructureVillagePieces.House1 if(hasStuff){ ItemStack ring = new ItemStack(ItemList.ring); JewelryNBT.addMetal(ring, JewelrycraftUtil.metal.get(random.nextInt(JewelrycraftUtil.metal.size()))); + ItemStack necklace = new ItemStack(ItemList.necklace); + JewelryNBT.addMetal(necklace, JewelrycraftUtil.metal.get(random.nextInt(JewelrycraftUtil.metal.size()))); if(meta == 0) molder.jewelBase = JewelrycraftUtil.metal.get(random.nextInt(JewelrycraftUtil.metal.size())); - else molder.jewelBase = ring; + else if(meta == 1) molder.jewelBase = ring; + else molder.jewelBase = necklace; molder.hasJewelBase = true; } } -- cgit v1.2.3