From 2e55905911a26297eab3fe8b46a1f39c95b32261 Mon Sep 17 00:00:00 2001 From: mDiyo Date: Thu, 14 Feb 2013 10:57:49 -0800 Subject: [PATCH] Liquid Smeltery --- resources/manuals/diary.xml | 6 +- resources/tinkertextures/gui/smeltery.png | Bin 2289 -> 2323 bytes resources/tinkertextures/mob/skyla.png | Bin 6878 -> 5762 bytes tinker/common/IFacingLogic.java | 3 +- tinker/common/InventoryBlock.java | 27 +- tinker/tconstruct/PHConstruct.java | 5 + tinker/tconstruct/TContent.java | 82 +++--- tinker/tconstruct/blocks/Axle.java | 89 ------ tinker/tconstruct/blocks/Landmine.java | 276 ++++++++++++++++++ tinker/tconstruct/blocks/TBaseOre.java | 52 ---- tinker/tconstruct/blocks/TBaseOreItem.java | 31 -- tinker/tconstruct/client/SmelteryRender.java | 10 + tinker/tconstruct/client/TProxyClient.java | 12 +- .../client/entityrender/SkylaModel.java | 174 ++++++----- tinker/tconstruct/client/gui/SmelteryGui.java | 15 +- .../client/tmt/ModelRendererTurbo.java | 141 ++++++++- tinker/tconstruct/crafting/Smeltery.java | 20 +- .../CraftedSoilItemBlock.java | 2 +- .../SearedBrickItemBlock.java | 2 +- .../ToolStationItemBlock.java | 2 +- tinker/tconstruct/logic/SmelteryLogic.java | 163 ++++------- .../worldgen/ManhattanOreGenerator.java | 59 ++-- 22 files changed, 684 insertions(+), 487 deletions(-) delete mode 100644 tinker/tconstruct/blocks/Axle.java create mode 100644 tinker/tconstruct/blocks/Landmine.java delete mode 100644 tinker/tconstruct/blocks/TBaseOre.java delete mode 100644 tinker/tconstruct/blocks/TBaseOreItem.java rename tinker/tconstruct/{blocks => items}/CraftedSoilItemBlock.java (94%) rename tinker/tconstruct/{blocks => items}/SearedBrickItemBlock.java (94%) rename tinker/tconstruct/{blocks => items}/ToolStationItemBlock.java (95%) diff --git a/resources/manuals/diary.xml b/resources/manuals/diary.xml index 431d79e2..8ac969fd 100644 --- a/resources/manuals/diary.xml +++ b/resources/manuals/diary.xml @@ -145,10 +145,7 @@ Tinker's Log #26: I have all these tools laying around with little notes on what each one does. Instead of leaving them scattered about, I think I will create one place to store them. -Tinker's Log #27: - -I went exploring and found some new ores today. They're colors I've never seen before, and they don't shatter on impact like iron does. I wonder what I can do with these? - + Tinker's Log #27: I went exploring and found some new ores today. They're colors I've never seen before, and they don't shatter on impact like iron does. I wonder what I can do with these? @@ -156,6 +153,7 @@ I went exploring and found some new ores today. They're colors I've never seen b Tinker's Log #28: The normal furnace is nice for keeping warm, but it leaves something to be desired for processing metal. I've dug a pit and lined it with some clay, gathered lava nearby, and put ore in the center in an attempt to improve on the design. The results were quite interesting. + The more lava I fed into the pit the hotter the material became. Eventually the whole thing liquified. I broke open the side of the pit with a cauldron in an attempt to catch the material, but it went everywhere. There were some remnants left in the pit as well. Raw ore still has parts of stone in it. There must be a way to remove the excess. diff --git a/resources/tinkertextures/gui/smeltery.png b/resources/tinkertextures/gui/smeltery.png index 14b5c13de83aea68c5d93815e1ba5457a4d2cfe5..4a2cfb0d8edab4dd0fcac4ca8f63c949adfc1058 100644 GIT binary patch delta 2035 zcmVNq=_Tl-Oi-g z-8)LQXo_b^_vd*kS(1m;aOZdPXZPI{TQ%S?r12Mje)Nml)qfi0#?`xAmv}JAks`&n zt1f=|`!7>O#CxBA7XSXkA0r~-?CeZ0MnpRf{#uQH4rKJFRL2l#a*ie6#g6gj2n zN{!{ZMBC)e|MTAGpT!5CejQ(2{U*-O&voJ;8~hxa>+9>yjCI=NNGYOia!i^WZBFr% zNfQwf>#l633V$Db`gJ^c_gd$@WCpPDwM5Wo?@jrS`+T$-@kw z)@Yj?%XNu7Ccua9$9o@r7U#nffb9&x;OAg9DMd4k@|;pMssFu6?tj18BtSn4;FbV@ zgS&uJKky?Wx>BR75nZj(zh4Hh)#?HcSvMSEms(?0`dPqu8jw+?R_t{eK4QT?|u97uK$Mld>)I%Vz1hHo40b` z<@c@o zMt_R!&i{C4U{~&T_J67&AOJXcwbuSAz`Q;8UzZxouEx`KxpO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GcFF^z<5CBaQmP*Qci zUakJL>&<^w4Id&>3Ex%eX>={xAp~m264F&2lMxnv2QMW;Rv=Us$lQd!ygrr2*H9Cv&s&Bh!M_VN!Q6$IHm?<+*wo39#C4a6{ zLL%U!1e7g{-L@o~3BkwotR!ID7Vnd2hr3?C%N?CS^nfS8_W4$&`CP|VTJPG))k^r# zwWJchtJ2fBmWM2IWaO|IGb$~F!sD72?*pPhC$X5p`w(qQlEmtk0ATJszKMI z(Jb^@@>7_%Nm-zN^wRN#o`O1Z?4H zz251nJwvcDnc&(M*GUMlQ-+i`EmGI8;VIUmQ{h^ccJAA4pdXsvd2a(t<1E1_>q*IssIalJo|R z&286#iW2A@q=_L+b9-%8Z9bQ~O6x5ymX+{<36=0&m7WF{>&rqnEYOLLs;hf1nl{nv zj4>_*2f=w%O~;VKba(HJihl`|5YROfLnswDOjJ$qj_BmI9HJH3@gx#Z2}VU5>T*XQ z5Vitk)8a!Q@fz|>Gga1GPwSQN zVZ>CzH$^pi8j~e>-QAqX)Q-ogjNn~V9lo1$H%kgsLa@=>wXNtF^?wQ$eHm-llVyY4 z5Y??t1XVW_mkUs!S7K#KvKH&xL#ggg5qLAnnnQsB#IGi*Cnn}%-M(xfWZlBLmW zl}wQyOAsxXhK}*Ji{7fYK%&q~2DPN(Zd;})TQL+#w8Z>Ea6tS#+(;%OmGDs&-&N_k zfCVgI0Sj2b0v51<1uS3z3s}Gc7O;Q?Ea2w>{y#6HbdkS%cpLx#002ovPDHLkV1n7$ BvX}q> diff --git a/tinker/common/IFacingLogic.java b/tinker/common/IFacingLogic.java index 288be79d..475c9a87 100644 --- a/tinker/common/IFacingLogic.java +++ b/tinker/common/IFacingLogic.java @@ -2,7 +2,6 @@ package tinker.common; public interface IFacingLogic { - public boolean canFaceVertical(); public byte getDirection(); - public void setDirection(byte direction); + public void setDirection(float yaw, float pitch); } \ No newline at end of file diff --git a/tinker/common/InventoryBlock.java b/tinker/common/InventoryBlock.java index 5511d091..c6e63a1f 100644 --- a/tinker/common/InventoryBlock.java +++ b/tinker/common/InventoryBlock.java @@ -103,34 +103,11 @@ public abstract class InventoryBlock extends BlockContainer IFacingLogic direction = (IFacingLogic) logic; if (entityliving == null) { - direction.setDirection((byte)1); + direction.setDirection(0F, 0F); } else { - int facing = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3; - switch (facing) - { - case 0: - direction.setDirection((byte)2); - break; - - case 1: - direction.setDirection((byte)5); - break; - - case 2: - direction.setDirection((byte)3); - break; - - case 3: - direction.setDirection((byte)4); - break; - } - - if (direction.canFaceVertical()) - { - //TODO: Vertical facing - } + direction.setDirection(entityliving.rotationYaw * 4F, entityliving.rotationPitch); } } } diff --git a/tinker/tconstruct/PHConstruct.java b/tinker/tconstruct/PHConstruct.java index f617cd17..e2cedc82 100644 --- a/tinker/tconstruct/PHConstruct.java +++ b/tinker/tconstruct/PHConstruct.java @@ -46,6 +46,7 @@ public class PHConstruct { smeltery = config.getBlock("Smeltery", 1474).getInt(1474); searedBrick = config.getBlock("Seared Brick", 1477).getInt(1477); craftedSoil = config.getBlock("Special Soil", 1476).getInt(1476); + landmine = config.getBlock("Landmine", 1475).getInt(1475); ironFlowing = config.getBlock("Liquid Iron Flowing", 1478).getInt(1478); ironStill = config.getBlock("Liquid Iron Still", 1479).getInt(1479); @@ -156,6 +157,10 @@ public class PHConstruct { public static int searedBrick; public static int axle; + //Traps + public static int landmine; + + //Liquids public static int ironFlowing; public static int ironStill; public static int goldFlowing; diff --git a/tinker/tconstruct/TContent.java b/tinker/tconstruct/TContent.java index 25ec66e8..5f385f07 100644 --- a/tinker/tconstruct/TContent.java +++ b/tinker/tconstruct/TContent.java @@ -1,47 +1,26 @@ package tinker.tconstruct; import net.minecraft.block.Block; +import net.minecraft.block.EnumMobType; import net.minecraft.block.material.Material; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.liquids.LiquidStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; -import tinker.common.IPattern; -import tinker.tconstruct.blocks.EquipBlock; -import tinker.tconstruct.blocks.SearedBrick; -import tinker.tconstruct.blocks.TConstructBlock; -import tinker.tconstruct.blocks.ToolStationBlock; -import tinker.tconstruct.client.gui.ToolGuiElement; -import tinker.tconstruct.crafting.PatternBuilder; -import tinker.tconstruct.crafting.ToolBuilder; -import tinker.tconstruct.items.CraftingItem; -import tinker.tconstruct.items.Materials; -import tinker.tconstruct.items.Pattern; -import tinker.tconstruct.items.PatternManual; -import tinker.tconstruct.items.ToolPart; -import tinker.tconstruct.items.ToolShard; -import tinker.tconstruct.modifiers.ModBlaze; -import tinker.tconstruct.modifiers.ModBoolean; -import tinker.tconstruct.modifiers.ModDurability; -import tinker.tconstruct.modifiers.ModElectric; -import tinker.tconstruct.modifiers.ModInteger; -import tinker.tconstruct.modifiers.ModLapisBase; -import tinker.tconstruct.modifiers.ModLapisIncrease; -import tinker.tconstruct.modifiers.ModRedstone; -import tinker.tconstruct.modifiers.ModRepair; -import tinker.tconstruct.tools.Axe; -import tinker.tconstruct.tools.BattleSign; -import tinker.tconstruct.tools.Broadsword; -import tinker.tconstruct.tools.FryingPan; -import tinker.tconstruct.tools.Longsword; -import tinker.tconstruct.tools.Mattock; -import tinker.tconstruct.tools.Pickaxe; -import tinker.tconstruct.tools.Rapier; -import tinker.tconstruct.tools.Shovel; -import tinker.tconstruct.tools.ToolCore; + +import tinker.common.*; +import tinker.tconstruct.blocks.*; +import tinker.tconstruct.blocks.liquids.*; +import tinker.tconstruct.client.gui.*; +import tinker.tconstruct.crafting.*; +import tinker.tconstruct.items.*; +import tinker.tconstruct.modifiers.*; +import tinker.tconstruct.tools.*; + import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.GameRegistry; @@ -97,7 +76,11 @@ public class TContent implements IFuelHandler public static Block lavaTank; public static Block craftedSoil; public static Block searedBrick; + + //Traps + public static Block landmine; + //Liquids public static Block ironFlowing; public static Block ironStill; public static Block goldFlowing; @@ -124,6 +107,7 @@ public class TContent implements IFuelHandler public static Block obsidianFlowing; public static Block obsidianStill; + //public static Block axle; //Tool modifiers @@ -152,8 +136,9 @@ public class TContent implements IFuelHandler void registerBlocks() { + //Tool Station woodCrafter = new ToolStationBlock(PHConstruct.woodCrafter, Material.wood); - GameRegistry.registerBlock(woodCrafter, tinker.tconstruct.blocks.ToolStationItemBlock.class, "ToolStationBlock"); + GameRegistry.registerBlock(woodCrafter, tinker.tconstruct.items.ToolStationItemBlock.class, "ToolStationBlock"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.ToolStationLogic.class, "ToolStation"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.PartCrafterLogic.class, "PartCrafter"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.PatternChestLogic.class, "PatternHolder"); @@ -162,24 +147,22 @@ public class TContent implements IFuelHandler heldItemBlock = new EquipBlock(PHConstruct.heldItemBlock, Material.wood); GameRegistry.registerBlock(heldItemBlock, "HeldItemBlock"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.FrypanLogic.class, "FrypanLogic"); + + craftedSoil = new TConstructBlock(PHConstruct.craftedSoil, 96, Material.sand, 3.0F, 2); + craftedSoil.stepSound = Block.soundGravelFootstep; + GameRegistry.registerBlock(craftedSoil, tinker.tconstruct.items.CraftedSoilItemBlock.class, "CraftedSoil"); - //ores = new TBaseOre(PHTools.ores, 48); - //GameRegistry.registerBlock(ores, tinker.toolconstruct.blocks.TBaseOreItem.class, "TConstruct.ores"); - - /*lavaTank = new LavaTankBlock(PHConstruct.lavaTank); + //Smeltery + lavaTank = new LavaTankBlock(PHConstruct.lavaTank); GameRegistry.registerBlock(lavaTank, "LavaTank"); GameRegistry.registerTileEntity(tinker.tconstruct.logic.LavaTankLogic.class, "TConstruct.LavaTank"); smeltery = new SmelteryBlock(PHConstruct.smeltery); GameRegistry.registerBlock(smeltery, "Smeltery"); - GameRegistry.registerTileEntity(tinker.tconstruct.logic.SmelteryLogic.class, "TConstruct.Smeltery");*/ - - craftedSoil = new TConstructBlock(PHConstruct.craftedSoil, 96, Material.sand, 3.0F, 2); - craftedSoil.stepSound = Block.soundGravelFootstep; - GameRegistry.registerBlock(craftedSoil, tinker.tconstruct.blocks.CraftedSoilItemBlock.class, "CraftedSoil"); + GameRegistry.registerTileEntity(tinker.tconstruct.logic.SmelteryLogic.class, "TConstruct.Smeltery"); searedBrick = new SearedBrick(PHConstruct.searedBrick, 80, Material.iron, 10.0F, 6); - GameRegistry.registerBlock(searedBrick, tinker.tconstruct.blocks.SearedBrickItemBlock.class, "SearedBrick"); + GameRegistry.registerBlock(searedBrick, tinker.tconstruct.items.SearedBrickItemBlock.class, "SearedBrick"); MinecraftForge.setBlockHarvestLevel(searedBrick, 0, "pickaxe", 2); MinecraftForge.setBlockHarvestLevel(searedBrick, 1, "pickaxe", 4); MinecraftForge.setBlockHarvestLevel(searedBrick, 2, "pickaxe", 4); @@ -187,7 +170,8 @@ public class TContent implements IFuelHandler MinecraftForge.setBlockHarvestLevel(searedBrick, 4, "pickaxe", 1); MinecraftForge.setBlockHarvestLevel(searedBrick, 5, "pickaxe", 1); - /*ironFlowing = new IronFlowing(PHConstruct.ironFlowing).setBlockName("liquid.ironFlow"); + //Liquids + ironFlowing = new IronFlowing(PHConstruct.ironFlowing).setBlockName("liquid.ironFlow"); GameRegistry.registerBlock(ironFlowing, "Liquid Iron Flowing"); ironStill = new IronStill(PHConstruct.ironStill).setBlockName("liquid.ironStill"); GameRegistry.registerBlock(ironStill, "Liquid Iron Still"); @@ -234,7 +218,11 @@ public class TContent implements IFuelHandler obsidianFlowing = new ObsidianFlowing(PHConstruct.obsidianFlowing).setBlockName("liquid.obsidianFlow"); GameRegistry.registerBlock(obsidianFlowing, "Liquid obsidian Flowing"); obsidianStill = new ObsidianStill(PHConstruct.obsidianStill).setBlockName("liquid.obsidianStill"); - GameRegistry.registerBlock(obsidianStill, "Liquid obsidian Still");*/ + GameRegistry.registerBlock(obsidianStill, "Liquid obsidian Still"); + + //Traps + landmine = new Landmine(PHConstruct.landmine, 0, EnumMobType.mobs, Material.cactus).setBlockName("landmine"); + GameRegistry.registerBlock(landmine, "landmine"); } void createItems () @@ -410,7 +398,7 @@ public class TContent implements IFuelHandler void addSmelteryRecipes() { - //Smeltery.instance.addSmelting(Block.oreIron.blockID, 0, 450, new ItemStack(ironStill, 1, 0)); + Smeltery.instance.addLiquidMelting(Block.oreIron.blockID, 0, 450, new LiquidStack(ironStill.blockID, 250, 0)); } void addCraftingRecipes () diff --git a/tinker/tconstruct/blocks/Axle.java b/tinker/tconstruct/blocks/Axle.java deleted file mode 100644 index feb6c86f..00000000 --- a/tinker/tconstruct/blocks/Axle.java +++ /dev/null @@ -1,89 +0,0 @@ -package tinker.tconstruct.blocks; - -import java.util.Random; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import tinker.tconstruct.client.AxleRender; - -public class Axle extends Block -{ - - public Axle(int id, Material material) - { - super(id, material); - this.setHardness(0.3f); - this.setBlockBounds(0, 0, 0, 1, 0.25f, 1); - //this.setCreativeTab(ToolConstruct.materialTab); - } - - /*public String getTextureFile() - { - return "/tinkertextures/ConstructBlocks.png"; - }*/ - - public int getBlockTextureFromSideAndMetadata (int side, int meta) - { - //return 22 + meta*6 + side; - return 18; - } - - @Override - public boolean renderAsNormalBlock () - { - return false; - } - - @Override - public boolean isOpaqueCube () - { - return false; - } - - @Override - public int getRenderType () - { - return AxleRender.axleModelID; - } - - @Override - public int idDropped (int par1, Random par2Random, int par3) - { - return 0; - } - - /*public TileEntity createNewTileEntity (World world, int metadata) - { - return new FrypanLogic(); - }*/ - - /*public void randomDisplayTick (World world, int x, int y, int z, Random random) - { - if (isActive(world, x, y, z)) - { - float f = (float) x + 0.5F; - float f1 = (float) y + 0.25F + (random.nextFloat() * 6F) / 16F; - float f2 = (float) z + 0.5F; - float f4 = random.nextFloat() * 0.6F - 0.3F; - world.spawnParticle("smoke", f, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - world.spawnParticle("flame", f, f1, f2 + f4, 0.0D, 0.0D, 0.0D); - } - } - - public int getLightValue (IBlockAccess world, int x, int y, int z) - { - return !isActive(world, x, y, z) ? 0 : 9; - } - - @Override - public Integer getGui (World world, int x, int y, int z, EntityPlayer entityplayer) - { - return TConstructGuiHandler.frypanID; - } - - @Override - public Object getModInstance () - { - return TConstruct.instance; - }*/ -} diff --git a/tinker/tconstruct/blocks/Landmine.java b/tinker/tconstruct/blocks/Landmine.java new file mode 100644 index 00000000..4fcaaf88 --- /dev/null +++ b/tinker/tconstruct/blocks/Landmine.java @@ -0,0 +1,276 @@ +package tinker.tconstruct.blocks; + +import java.util.Iterator; +import java.util.List; +import java.util.Random; + +import tinker.tconstruct.TConstruct; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockFence; +import net.minecraft.block.EnumMobType; +import net.minecraft.block.material.Material; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; + +public class Landmine extends Block +{ + /** The mob type that can trigger this pressure plate. */ + private EnumMobType triggerMobType; + + public Landmine(int par1, int par2, EnumMobType par3EnumMobType, Material par4Material) + { + super(par1, par2, par4Material); + this.triggerMobType = EnumMobType.mobs; + this.setCreativeTab(TConstruct.blockTab); + this.setTickRandomly(true); + float var5 = 0.0625F; + this.setBlockBounds(var5, 0.0F, var5, 1.0F - var5, 0.03125F, 1.0F - var5); + } + + /** + * How many world ticks before ticking + */ + public int tickRate() + { + return 20; + } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been + * cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + return null; + } + + /** + * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two + * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block. + */ + public boolean isOpaqueCube() + { + return false; + } + + /** + * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) + */ + public boolean renderAsNormalBlock() + { + return false; + } + + public boolean getBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + return true; + } + + /** + * Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z + */ + public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4) + { + return par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) || BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4)); + } + + /** + * Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are + * their own) Args: x, y, z, neighbor blockID + */ + public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) + { + boolean var6 = false; + + if (!par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && !BlockFence.isIdAFence(par1World.getBlockId(par2, par3 - 1, par4))) + { + var6 = true; + } + + if (var6) + { + this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0); + par1World.setBlockWithNotify(par2, par3, par4, 0); + } + } + + /** + * Ticks the block if it's been scheduled + */ + public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) + { + if (!par1World.isRemote) + { + if (par1World.getBlockMetadata(par2, par3, par4) != 0) + { + this.setStateIfMobInteractsWithPlate(par1World, par2, par3, par4); + } + } + } + + /** + * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity + */ + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + if (!par1World.isRemote) + { + if (par1World.getBlockMetadata(par2, par3, par4) != 1) + { + this.setStateIfMobInteractsWithPlate(par1World, par2, par3, par4); + } + } + } + + /** + * Checks if there are mobs on the plate. If a mob is on the plate and it is off, it turns it on, and vice versa. + */ + private void setStateIfMobInteractsWithPlate(World world, int posX, int posY, int posZ) + { + boolean var5 = world.getBlockMetadata(posX, posY, posZ) == 1; + boolean var6 = false; + float var7 = 0.125F; + List var8 = null; + + if (this.triggerMobType == EnumMobType.everything) + { + var8 = world.getEntitiesWithinAABBExcludingEntity((Entity)null, AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)posX + var7), (double)posY, (double)((float)posZ + var7), (double)((float)(posX + 1) - var7), (double)posY + 0.25D, (double)((float)(posZ + 1) - var7))); + } + + if (this.triggerMobType == EnumMobType.mobs) + { + var8 = world.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)posX + var7), (double)posY, (double)((float)posZ + var7), (double)((float)(posX + 1) - var7), (double)posY + 0.25D, (double)((float)(posZ + 1) - var7))); + } + + if (this.triggerMobType == EnumMobType.players) + { + var8 = world.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getAABBPool().addOrModifyAABBInPool((double)((float)posX + var7), (double)posY, (double)((float)posZ + var7), (double)((float)(posX + 1) - var7), (double)posY + 0.25D, (double)((float)(posZ + 1) - var7))); + } + + if (!var8.isEmpty()) + { + Iterator var9 = var8.iterator(); + + while (var9.hasNext()) + { + Entity var10 = (Entity)var9.next(); + + if (!var10.doesEntityNotTriggerPressurePlate()) + { + var6 = true; + break; + } + } + } + + if (var6 && !var5) + { + world.setBlockWithNotify(posX, posY, posZ, 0); + world.createExplosion((Entity)null, posX, posY, posZ, 2.0F, true); + /*par1World.setBlockMetadataWithNotify(posX, posY, posZ, 1); + par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID); + par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID); + par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ); + par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.6F);*/ + } + + /*if (!var6 && var5) + { + par1World.setBlockMetadataWithNotify(posX, posY, posZ, 0); + par1World.notifyBlocksOfNeighborChange(posX, posY, posZ, this.blockID); + par1World.notifyBlocksOfNeighborChange(posX, posY - 1, posZ, this.blockID); + par1World.markBlockRangeForRenderUpdate(posX, posY, posZ, posX, posY, posZ); + par1World.playSoundEffect((double)posX + 0.5D, (double)posY + 0.1D, (double)posZ + 0.5D, "random.click", 0.3F, 0.5F); + } + + if (var6) + { + par1World.scheduleBlockUpdate(posX, posY, posZ, this.blockID, this.tickRate()); + }*/ + } + + /** + * ejects contained items into the world, and notifies neighbours of an update, as appropriate + */ + public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) + { + if (par6 > 0) + { + par1World.notifyBlocksOfNeighborChange(par2, par3, par4, this.blockID); + par1World.notifyBlocksOfNeighborChange(par2, par3 - 1, par4, this.blockID); + } + + super.breakBlock(par1World, par2, par3, par4, par5, par6); + } + + /** + * Updates the blocks bounds based on its current state. Args: world, x, y, z + */ + public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) + { + boolean var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4) == 1; + float var6 = 0.0625F; + + if (var5) + { + this.setBlockBounds(var6, 0.0F, var6, 1.0F - var6, 0.03125F, 1.0F - var6); + } + else + { + this.setBlockBounds(var6, 0.0F, var6, 1.0F - var6, 0.0625F, 1.0F - var6); + } + } + + /** + * Returns true if the block is emitting indirect/weak redstone power on the specified side. If isBlockNormalCube + * returns true, standard redstone propagation rules will apply instead and this will not be called. Args: World, X, + * Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block. + */ + public boolean isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return par1IBlockAccess.getBlockMetadata(par2, par3, par4) > 0; + } + + /** + * Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z, + * side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block. + */ + public boolean isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) + { + return par1IBlockAccess.getBlockMetadata(par2, par3, par4) == 0 ? false : par5 == 1; + } + + /** + * Can this block provide power. Only wire currently seems to have this change based on its state. + */ + public boolean canProvidePower() + { + return true; + } + + /** + * Sets the block's bounds for rendering it as an item + */ + public void setBlockBoundsForItemRender() + { + float var1 = 0.5F; + float var2 = 0.125F; + float var3 = 0.5F; + this.setBlockBounds(0.5F - var1, 0.5F - var2, 0.5F - var3, 0.5F + var1, 0.5F + var2, 0.5F + var3); + } + + /** + * Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility + * and stop pistons + */ + public int getMobilityFlag() + { + return 1; + } +} diff --git a/tinker/tconstruct/blocks/TBaseOre.java b/tinker/tconstruct/blocks/TBaseOre.java deleted file mode 100644 index 1ff2d6e9..00000000 --- a/tinker/tconstruct/blocks/TBaseOre.java +++ /dev/null @@ -1,52 +0,0 @@ -package tinker.tconstruct.blocks; -import java.util.List; -import java.util.Random; - -import tinker.tconstruct.TConstruct; -import tinker.tconstruct.TContent; - -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -public class TBaseOre extends Block -{ - public TBaseOre(int id, int tex) - { - super(id, tex, Material.rock); - enableStats = false; - setCreativeTab(TConstruct.blockTab); - } - - public int damageDropped(int meta) - { - return meta; - } - - /*@Override - public int idDropped(int par1, Random par2Random, int par3) - { - return TConstructContent.ores.blockID; - }*/ - - public int getBlockTextureFromSideAndMetadata(int side, int meta) - { - return blockIndexInTexture + meta; - } - - public String getTextureFile() - { - return TContent.blockTexture; - } - - @Override - public void getSubBlocks(int id, CreativeTabs tab, List list) - { - for (int iter = 0; iter < 2; iter++) - { - list.add(new ItemStack(id, 1, iter)); - } - } -} diff --git a/tinker/tconstruct/blocks/TBaseOreItem.java b/tinker/tconstruct/blocks/TBaseOreItem.java deleted file mode 100644 index 207c969e..00000000 --- a/tinker/tconstruct/blocks/TBaseOreItem.java +++ /dev/null @@ -1,31 +0,0 @@ -package tinker.tconstruct.blocks; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.util.MathHelper; - -public class TBaseOreItem extends ItemBlock -{ - public static final String blockType[] = - { - "cobalt", "ardite" - }; - - public TBaseOreItem(int i) - { - super(i); - setMaxDamage(0); - setHasSubtypes(true); - } - - @Override - public int getMetadata(int md) - { - return md; - } - - public String getItemNameIS(ItemStack itemstack) - { - int arrayPos = MathHelper.clamp_int(itemstack.getItemDamage(), 0, 1); - return new StringBuilder().append("block.tconstruct").append(blockType[arrayPos]).toString(); - } -} diff --git a/tinker/tconstruct/client/SmelteryRender.java b/tinker/tconstruct/client/SmelteryRender.java index 491fbe5e..8960e8d2 100644 --- a/tinker/tconstruct/client/SmelteryRender.java +++ b/tinker/tconstruct/client/SmelteryRender.java @@ -5,6 +5,7 @@ import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; import net.minecraftforge.client.ForgeHooksClient; +import net.minecraftforge.liquids.LiquidStack; import org.lwjgl.opengl.GL11; @@ -34,6 +35,7 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler if (logic.validStructure) { int posX = logic.centerPos.x - 1, posY = logic.centerPos.y, posZ = logic.centerPos.z - 1; + //Melting for (int i = 0; i < 9; i++) { if (logic.isStackInSlot(i)) @@ -43,6 +45,14 @@ public class SmelteryRender implements ISimpleBlockRenderingHandler renderer.renderStandardBlock(invBlock, posX + i % 3, posY, posZ + i / 3); } } + + //Liquids + for (LiquidStack liquid : logic.moltenMetal) + { + Block invBlock = Block.blocksList[liquid.itemID]; + ForgeHooksClient.bindTexture(invBlock.getTextureFile(), 0); + renderer.renderStandardBlock(invBlock, posX, posY, posZ); + } } } return false; diff --git a/tinker/tconstruct/client/TProxyClient.java b/tinker/tconstruct/client/TProxyClient.java index be1a1e91..342c150a 100644 --- a/tinker/tconstruct/client/TProxyClient.java +++ b/tinker/tconstruct/client/TProxyClient.java @@ -37,7 +37,7 @@ public class TProxyClient extends TProxyCommon RenderingRegistry.registerBlockHandler(new RenderLiquidMetal()); //RenderingRegistry.registerBlockHandler(new AxleRender()); - /*RenderEngine renderEngine = FMLClientHandler.instance().getClient().renderEngine; + RenderEngine renderEngine = FMLClientHandler.instance().getClient().renderEngine; renderEngine.registerTextureFX(new LiquidIronFX()); renderEngine.registerTextureFX(new LiquidIronFlowFX()); renderEngine.registerTextureFX(new LiquidGoldFX()); @@ -61,7 +61,7 @@ public class TProxyClient extends TProxyCommon renderEngine.registerTextureFX(new LiquidAlumiteFX()); renderEngine.registerTextureFX(new LiquidAlumiteFlowFX()); renderEngine.registerTextureFX(new LiquidObsidianFX()); - renderEngine.registerTextureFX(new LiquidObsidianFlowFX());*/ + renderEngine.registerTextureFX(new LiquidObsidianFlowFX()); //Tools MinecraftForgeClient.preloadTexture(TContent.blockTexture); @@ -80,7 +80,7 @@ public class TProxyClient extends TProxyCommon /* Ties an internal name to a visible one. */ public void addNames() { - //LanguageRegistry.addName(TContent.lavaTank, "Lava Tank"); + LanguageRegistry.addName(TContent.lavaTank, "Lava Tank"); LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructTools", "TConstruct Tools"); LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructMaterials", "TConstruct Materials"); LanguageRegistry.instance().addStringLocalization("itemGroup.TConstructBlocks", "TConstruct Blocks"); @@ -138,7 +138,7 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.instance().addStringLocalization(internalName, "en_US", visibleName); } - //LanguageRegistry.addName(TContent.smeltery, "Smeltery"); + LanguageRegistry.addName(TContent.smeltery, "Smeltery"); LanguageRegistry.addName(TContent.manualBook, "Tinker's Log"); LanguageRegistry.addName(TContent.blankPattern, "Blank Pattern"); LanguageRegistry.addName(TContent.pickaxe, "Pickaxe"); @@ -152,7 +152,7 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.addName(TContent.mattock, "Mattock"); //LanguageRegistry.addName(TContent.lumberaxe, "Lumber Axe"); - /*LanguageRegistry.addName(TContent.ironFlowing, "Liquid Iron"); + LanguageRegistry.addName(TContent.ironFlowing, "Liquid Iron"); LanguageRegistry.addName(TContent.ironStill, "Liquid Iron"); LanguageRegistry.addName(TContent.goldFlowing, "Liquid Gold"); LanguageRegistry.addName(TContent.goldStill, "Liquid Gold"); @@ -176,7 +176,7 @@ public class TProxyClient extends TProxyCommon LanguageRegistry.addName(TContent.manyullynFlowing, "Liquid Manyullyn"); LanguageRegistry.addName(TContent.manyullynStill, "Liquid Manyullyn"); LanguageRegistry.addName(TContent.obsidianFlowing, "Liquid Obsidian"); - LanguageRegistry.addName(TContent.obsidianStill, "Liquid Obsidian");*/ + LanguageRegistry.addName(TContent.obsidianStill, "Liquid Obsidian"); } diff --git a/tinker/tconstruct/client/entityrender/SkylaModel.java b/tinker/tconstruct/client/entityrender/SkylaModel.java index cc2dcd9c..6486ffde 100644 --- a/tinker/tconstruct/client/entityrender/SkylaModel.java +++ b/tinker/tconstruct/client/entityrender/SkylaModel.java @@ -11,14 +11,19 @@ public class SkylaModel extends ModelBase ModelRenderer Hair; ModelRenderer Neck; ModelRenderer Torso; + ModelRendererTurbo Skirt; ModelRenderer Breast; ModelRenderer RightArm; - ModelRenderer LeftArm; + ModelRenderer RightBand; + ModelRendererTurbo RightSleeve; ModelRenderer RightHand; + ModelRenderer LeftArm; + ModelRenderer LeftBand; + ModelRendererTurbo LeftSleeve; ModelRenderer LeftHand; ModelRenderer RightLeg; - ModelRenderer LeftLeg; ModelRenderer RightFoot; + ModelRenderer LeftLeg; ModelRenderer LeftFoot; ModelRenderer WingBaseRight; ModelRenderer WingEdgeRight; @@ -43,141 +48,175 @@ public class SkylaModel extends ModelBase //Head.addCylinder(0, 0, 0, 8, 16, 24, 0, ModelRendererTurbo.MR_BOTTOM); Head.setRotationPoint(0F, -3F, 0F); setRotation(Head, 0F, 0F, 0F); - + Hair = new ModelRenderer(this, 32, 0); Hair.addBox(-4F, -4F, -4F, 8, 8, 8, 0.5F); Hair.setRotationPoint(0F, -7F, 0F); setRotation(Hair, 0F, 0F, 0F); - + Neck = new ModelRenderer(this, 0, 0); Neck.addBox(-1F, 0F, -1F, 2, 1, 2); - Neck.setRotationPoint(0F, -3F, 0F); + Neck.setRotationPoint(0F, -1F, 0F); setRotation(Neck, 0F, 0F, 0F); - + Torso = new ModelRenderer(this, 0, 16); Torso.addBox(-1.5F, 0F, -1F, 3, 8, 2); Torso.setRotationPoint(0F, -2F, 0F); setRotation(Torso, 0F, 0F, 0F); - + Breast = new ModelRenderer(this, 0, 4); Breast.addBox(-1.5F, 0F, 0F, 3, 3, 1); - Breast.setRotationPoint(0F, -1F, -1F); + Breast.setRotationPoint(0F, 1F, -1F); setRotation(Breast, -0.2617994F, 0F, 0F); + Torso.addChild(Neck); + Torso.addChild(Breast); + + Skirt = new ModelRendererTurbo(this, 22, 42, textureWidth, textureHeight); + Skirt.addTrapezoid(-3F, 0F, -2F, 6, 4, 4, 0, -0.5f, 4); + Skirt.setRotationPoint(0F, 5F, 0F); + setRotation(Skirt, 0F, 0F, 0F); + RightArm = new ModelRenderer(this, 14, 16); - RightArm.addBox(-1.5F, -1F, -1F, 2, 7, 2); - RightArm.setRotationPoint(-2F, -1F, 0.1F); + RightArm.addBox(-1F, -1F, -1F, 2, 7, 2); + RightArm.setRotationPoint(-2.5F, -1F, 0.1F); setRotation(RightArm, 0F, 0F, 0F); - - LeftArm = new ModelRenderer(this, 22, 16); - LeftArm.addBox(-0.5F, -1F, -1F, 2, 7, 2); - LeftArm.setRotationPoint(2F, -1F, 0.1F); - setRotation(LeftArm, 0F, 0F, 0F); - - RightHand = new ModelRenderer(this, 14, 25); - RightHand.addBox(-1F, 0F, -2F, 2, 8, 2); - RightHand.setRotationPoint(-0.5F, 6F, 1.1F); + + RightBand = new ModelRenderer(this, 10, 25); + RightBand.addBox(-1.5F, 0F, -1.5F, 3, 2, 3); + RightBand.setRotationPoint(0F, 0F, 0.1F); + setRotation(RightBand, 0F, 0F, 0F); + + RightSleeve = new ModelRendererTurbo(this, 10, 30, textureWidth, textureHeight); + RightSleeve.addTrapezoid(-1.5F, 0F, -2.5F, 3, 6, 3, 0, -0.5f, 4); + RightSleeve.setRotationPoint(0F, 6F, 1.0F); + setRotation(RightSleeve, 0F, 0F, 0F); + + RightHand = new ModelRenderer(this, 12, 39); + RightHand.addBox(-1F, 0F, -1F, 2, 2, 2); + RightHand.setRotationPoint(0F, 12F, 0F); setRotation(RightHand, 0F, 0F, 0F); - - LeftHand = new ModelRenderer(this, 22, 25); - LeftHand.addBox(-1F, 0F, -2F, 2, 8, 2); - LeftHand.setRotationPoint(0.5F, 6F, 1.1F); - setRotation(LeftHand, 0F, 0F, 0F); - - LeftArm.addChild(LeftHand); + + RightArm.addChild(RightBand); + RightArm.addChild(RightSleeve); RightArm.addChild(RightHand); - - RightLeg = new ModelRenderer(this, 30, 16); + + LeftArm = new ModelRenderer(this, 22, 16); + LeftArm.addBox(-1F, -1F, -1F, 2, 7, 2); + LeftArm.setRotationPoint(2.5F, -1F, 0.1F); + setRotation(LeftArm, 0F, 0F, 0F); + + LeftBand = new ModelRenderer(this, 22, 25); + LeftBand.addBox(-1.5F, 0F, -1.5F, 3, 2, 3); + LeftBand.setRotationPoint(0F, 0F, 0.1F); + setRotation(LeftBand, 0F, 0F, 0F); + + LeftSleeve = new ModelRendererTurbo(this, 22, 30, textureWidth, textureHeight); + LeftSleeve.addTrapezoid(-1.5F, 0F, -2.5F, 3, 6, 3, 0, -0.5f, 4); + //LeftSleeve.addBox(-1.5F, 0F, -2.5F, 3, 6, 3); + LeftSleeve.setRotationPoint(0F, 6F, 1.0F); + setRotation(LeftSleeve, 0F, 0F, 0F); + + LeftHand = new ModelRenderer(this, 20, 39); + LeftHand.addBox(-1F, 0F, -1F, 2, 2, 2); + LeftHand.setRotationPoint(0F, 12F, 0F); + setRotation(LeftHand, 0F, 0F, 0F); + + LeftArm.addChild(LeftBand); + LeftArm.addChild(LeftSleeve); + LeftArm.addChild(LeftHand); + + RightLeg = new ModelRenderer(this, 34, 16); RightLeg.addBox(-1F, 0F, -1F, 2, 8, 2); RightLeg.setRotationPoint(-1F, 6F, 0F); setRotation(RightLeg, 0F, 0F, 0F); - - LeftLeg = new ModelRenderer(this, 38, 16); + + RightFoot = new ModelRenderer(this, 34, 28); + RightFoot.addBox(-1F, 0F, 0F, 2, 8, 2); + RightFoot.setRotationPoint(0F, 8F, -1F); + setRotation(RightFoot, 0F, 0F, 0F); + + LeftLeg = new ModelRenderer(this, 42, 16); LeftLeg.addBox(-1F, 0F, -1F, 2, 8, 2); LeftLeg.setRotationPoint(1F, 6F, 0F); setRotation(LeftLeg, 0F, 0F, 0F); - - RightFoot = new ModelRenderer(this, 30, 26); - RightFoot.addBox(-1F, 0F, 0F, 2, 10, 2); - RightFoot.setRotationPoint(0F, 8F, -1F); - setRotation(RightFoot, 0F, 0F, 0F); - - LeftFoot = new ModelRenderer(this, 38, 26); - LeftFoot.addBox(-1F, 0F, 0F, 2, 10, 2); + + LeftFoot = new ModelRenderer(this, 42, 28); + LeftFoot.addBox(-1F, 0F, 0F, 2, 8, 2); LeftFoot.setRotationPoint(0F, 8F, -1F); setRotation(LeftFoot, 0F, 0F, 0F); - + LeftLeg.addChild(LeftFoot); RightLeg.addChild(RightFoot); - + //Right Wing - WingBaseRight = new ModelRenderer(this, 0, 36); + WingBaseRight = new ModelRenderer(this, 0, 41); WingBaseRight.addBox(-0.5F, -1F, 0F, 1, 2, 10); WingBaseRight.setRotationPoint(-1F, 1F, 0F); setRotation(WingBaseRight, 0.5235988F, -0.5235988F, 0F); - - WingEdgeRight = new ModelRenderer(this, 0, 48); //Texture position + + WingEdgeRight = new ModelRenderer(this, 0, 53); //Texture position WingEdgeRight.addBox(0F, 0F, -2F, 1, 9, 2); //Offset, Size WingEdgeRight.setRotationPoint(-0.502F, -1F, 10F); //Negative x, y - 1, Position setRotation(WingEdgeRight, 0.5235988F, 0F, 0F); //Angle in radians - - WingInsetRight = new ModelRenderer(this, 6, 48); + + WingInsetRight = new ModelRenderer(this, 6, 53); WingInsetRight.addBox(0F, 0F, -1F, 1, 9, 2); WingInsetRight.setRotationPoint(-0.504F, 0F, 7.8F); setRotation(WingInsetRight, 0.3490659F, 0F, 0F); - - WingCenterRight = new ModelRenderer(this, 12, 48); + + WingCenterRight = new ModelRenderer(this, 12, 53); WingCenterRight.addBox(0F, 0F, -1F, 1, 9, 2); WingCenterRight.setRotationPoint(-0.506F, 0.3F, 6.3F); setRotation(WingCenterRight, 0.1745329F, 0F, 0F); - - WingFlangeRight = new ModelRenderer(this, 18, 48); + + WingFlangeRight = new ModelRenderer(this, 18, 53); WingFlangeRight.addBox(0F, 0F, -1F, 1, 8, 2); WingFlangeRight.setRotationPoint(-0.508F, 0.3F, 5.1F); setRotation(WingFlangeRight, 0F, 0F, 0F); - - WingAuxRight = new ModelRenderer(this, 24, 48); + + WingAuxRight = new ModelRenderer(this, 24, 53); WingAuxRight.addBox(0F, 0F, -1F, 1, 7, 2); WingAuxRight.setRotationPoint(-0.51F, 0.1F, 4F); setRotation(WingAuxRight, -0.1745329F, 0F, 0F); - + WingBaseRight.addChild(WingEdgeRight); WingBaseRight.addChild(WingInsetRight); WingBaseRight.addChild(WingCenterRight); WingBaseRight.addChild(WingFlangeRight); WingBaseRight.addChild(WingAuxRight); - + //Left Wing - WingBaseLeft = new ModelRenderer(this, 42, 36); + WingBaseLeft = new ModelRenderer(this, 42, 41); WingBaseLeft.addBox(-0.5F, -1F, 0F, 1, 2, 10); WingBaseLeft.setRotationPoint(1F, 1F, 0F); setRotation(WingBaseLeft, 0.5235988F, 0.5235988F, 0F); - - WingEdgeLeft = new ModelRenderer(this, 58, 48); + + WingEdgeLeft = new ModelRenderer(this, 58, 53); WingEdgeLeft.addBox(0F, 0F, -2F, 1, 9, 2); WingEdgeLeft.setRotationPoint(-0.502F, -1F, 10F); setRotation(WingEdgeLeft, 0.5235988F, 0F, 0F); - - WingInsetLeft = new ModelRenderer(this, 52, 48); + + WingInsetLeft = new ModelRenderer(this, 52, 53); WingInsetLeft.addBox(0F, 0F, -1F, 1, 9, 2); WingInsetLeft.setRotationPoint(-0.504F, 0F, 7.8F); setRotation(WingInsetLeft, 0.3490659F, 0F, 0F); - - WingCenterLeft = new ModelRenderer(this, 46, 48); + + WingCenterLeft = new ModelRenderer(this, 46, 53); WingCenterLeft.addBox(0F, 0F, -1F, 1, 9, 2); WingCenterLeft.setRotationPoint(-0.506F, 0.3F, 6.3F); setRotation(WingCenterLeft, 0.1745329F, 0F, 0F); - - WingFlangeLeft = new ModelRenderer(this, 40, 48); + + WingFlangeLeft = new ModelRenderer(this, 40, 53); WingFlangeLeft.addBox(0F, 0F, -1F, 1, 8, 2); WingFlangeLeft.setRotationPoint(-0.508F, 0.3F, 5.1F); setRotation(WingFlangeLeft, 0F, 0F, 0F); - - WingAuxLeft = new ModelRenderer(this, 34, 48); + + WingAuxLeft = new ModelRenderer(this, 34, 53); WingAuxLeft.addBox(0F, 0F, -1F, 1, 7, 2); WingAuxLeft.setRotationPoint(-0.51F, 0.1F, 4F); setRotation(WingAuxLeft, -0.1745329F, 0F, 0F); - + WingBaseLeft.addChild(WingEdgeLeft); WingBaseLeft.addChild(WingInsetLeft); WingBaseLeft.addChild(WingCenterLeft); @@ -191,9 +230,10 @@ public class SkylaModel extends ModelBase setRotationAngles(f, f1, f2, f3, f4, f5, entity); Head.render(f5); Hair.render(f5); - Neck.render(f5); + //Neck.render(f5); Torso.render(f5); - Breast.render(f5); + //Breast.render(f5); + Skirt.render(f5); RightArm.render(f5); LeftArm.render(f5); RightLeg.render(f5); diff --git a/tinker/tconstruct/client/gui/SmelteryGui.java b/tinker/tconstruct/client/gui/SmelteryGui.java index 97181526..018eb162 100644 --- a/tinker/tconstruct/client/gui/SmelteryGui.java +++ b/tinker/tconstruct/client/gui/SmelteryGui.java @@ -1,9 +1,11 @@ package tinker.tconstruct.client.gui; +import net.minecraft.block.Block; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.client.ForgeHooksClient; import org.lwjgl.opengl.GL11; @@ -45,8 +47,19 @@ public class SmelteryGui extends GuiContainer drawTexturedModalRect(cornerX, cornerY, 0, 0, xSize, ySize); if (logic.fuelGague > 0) { + ForgeHooksClient.bindTexture(Block.lavaStill.getTextureFile(), 0); + int index = Block.lavaStill.getBlockTextureFromSideAndMetadata(0, 0); + int texX = index % 16 * 16; + int texY = index / 16 * 16; int fuel = logic.getScaledFuelGague(52); - drawTexturedModalRect(cornerX + 146, (cornerY + 67) - fuel, 176, 52 - fuel, 14, fuel + 2); + int count = 0; + while (fuel > 0) + { + int size = fuel >= 16 ? 16 : fuel; + fuel -= size; + drawTexturedModalRect(cornerX + 146, (cornerY + 67) - size - 16*count, texX, texY+16-size, 9, size); + count++; + } } // Draw description diff --git a/tinker/tconstruct/client/tmt/ModelRendererTurbo.java b/tinker/tconstruct/client/tmt/ModelRendererTurbo.java index 31d6dcc3..5d33c92e 100644 --- a/tinker/tconstruct/client/tmt/ModelRendererTurbo.java +++ b/tinker/tconstruct/client/tmt/ModelRendererTurbo.java @@ -343,32 +343,32 @@ public class ModelRendererTurbo extends ModelRenderer */ public void addTrapezoid(float x, float y, float z, int w, int h, int d, float scale, float bottomScale, int dir) { - float f4 = x + (float)w; - float f5 = y + (float)h; - float f6 = z + (float)d; + float width = x + (float)w; + float height = y + (float)h; + float depth = z + (float)d; x -= scale; y -= scale; z -= scale; - f4 += scale; - f5 += scale; - f6 += scale; + width += scale; + height += scale; + depth += scale; int m = (mirror ? -1 : 1); if(mirror) { - float f7 = f4; - f4 = x; + float f7 = width; + width = x; x = f7; } float[] v = {x, y, z}; - float[] v1 = {f4, y, z}; - float[] v2 = {f4, f5, z}; - float[] v3 = {x, f5, z}; - float[] v4 = {x, y, f6}; - float[] v5 = {f4, y, f6}; - float[] v6 = {f4, f5, f6}; - float[] v7 = {x, f5, f6}; + float[] v1 = {width, y, z}; + float[] v2 = {width, height, z}; + float[] v3 = {x, height, z}; + float[] v4 = {x, y, depth}; + float[] v5 = {width, y, depth}; + float[] v6 = {width, height, depth}; + float[] v7 = {x, height, depth}; switch(dir) { @@ -437,6 +437,117 @@ public class ModelRendererTurbo extends ModelRenderer addRectShape(v, v1, v2, v3, v4, v5, v6, v7, w, h, d); } + /** + * Adds a trapezoid-like shape. It's achieved by expanding the shape on one side. + * You can use the static variables MR_RIGHT, MR_LEFT, + * MR_FRONT, MR_BACK, MR_TOP and + * MR_BOTTOM. + * @param x the starting x-position + * @param y the starting y-position + * @param z the starting z-position + * @param w the width (over the x-direction) + * @param h the height (over the y-direction) + * @param d the depth (over the z-direction) + * @param scale the "scale" of the box. It only increases the size in each direction by that many. + * @param bottomScale the "scale" of the bottom + * @param dir the side the scaling is applied to + */ + /*public void addTrapezoid(float x, float y, float z, int w, int h, int d, float scale, float bottomScale, int dir) + { + float width = x + (float)w; + float height = y + (float)h; + float depth = z + (float)d; + x -= scale; + y -= scale; + z -= scale; + width += scale; + height += scale; + depth += scale; + + int m = (mirror ? -1 : 1); + if(mirror) + { + float f7 = width; + width = x; + x = f7; + } + + float[] v = {x, y, z}; + float[] v1 = {width, y, z}; + float[] v2 = {width, height, z}; + float[] v3 = {x, height, z}; + float[] v4 = {x, y, depth}; + float[] v5 = {width, y, depth}; + float[] v6 = {width, height, depth}; + float[] v7 = {x, height, depth}; + + switch(dir) + { + case MR_RIGHT: + v[1] -= bottomScale; + v[2] -= bottomScale; + v3[1] += bottomScale; + v3[2] -= bottomScale; + v4[1] -= bottomScale; + v4[2] += bottomScale; + v7[1] += bottomScale; + v7[2] += bottomScale; + break; + case MR_LEFT: + v1[1] -= bottomScale; + v1[2] -= bottomScale; + v2[1] += bottomScale; + v2[2] -= bottomScale; + v5[1] -= bottomScale; + v5[2] += bottomScale; + v6[1] += bottomScale; + v6[2] += bottomScale; + break; + case MR_FRONT: + v[0] -= m * bottomScale; + v[1] -= bottomScale; + v1[0] += m * bottomScale; + v1[1] -= bottomScale; + v2[0] += m * bottomScale; + v2[1] += bottomScale; + v3[0] -= m * bottomScale; + v3[1] += bottomScale; + break; + case MR_BACK: + v4[0] -= m * bottomScale; + v4[1] -= bottomScale; + v5[0] += m * bottomScale; + v5[1] -= bottomScale; + v6[0] += m * bottomScale; + v6[1] += bottomScale; + v7[0] -= m * bottomScale; + v7[1] += bottomScale; + break; + case MR_TOP: + v[0] -= m * bottomScale; + v[2] -= bottomScale; + v1[0] += m * bottomScale; + v1[2] -= bottomScale; + v4[0] -= m * bottomScale; + v4[2] += bottomScale; + v5[0] += m * bottomScale; + v5[2] += bottomScale; + break; + case MR_BOTTOM: + v2[0] += m * bottomScale; + v2[2] -= bottomScale; + v3[0] -= m * bottomScale; + v3[2] -= bottomScale; + v6[0] += m * bottomScale; + v6[2] += bottomScale; + v7[0] -= m * bottomScale; + v7[2] += bottomScale; + break; + } + + addRectShape(v, v1, v2, v3, v4, v5, v6, v7, w, h, d); + }*/ + /** * Creates a shape from a 2D vector shape. * @param x the starting x position diff --git a/tinker/tconstruct/crafting/Smeltery.java b/tinker/tconstruct/crafting/Smeltery.java index 82d30c79..98943569 100644 --- a/tinker/tconstruct/crafting/Smeltery.java +++ b/tinker/tconstruct/crafting/Smeltery.java @@ -1,14 +1,18 @@ package tinker.tconstruct.crafting; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; + import net.minecraft.item.ItemStack; +import net.minecraftforge.liquids.LiquidStack; /** Melting and hacking, churn and burn */ public class Smeltery { public static Smeltery instance = new Smeltery(); - private HashMap, ItemStack> smeltingList = new HashMap, ItemStack>(); + private HashMap, LiquidStack> smeltingList = new HashMap, LiquidStack>(); private HashMap, Integer> temperatureList = new HashMap, Integer>(); /** Adds a mapping between an input and an itemstack @@ -17,7 +21,7 @@ public class Smeltery * @param metadata Damage or use * @param itemstack */ - public static void addSmelting(int itemID, int metadata, int temperature, ItemStack itemstack) + public static void addLiquidMelting(int itemID, int metadata, int temperature, LiquidStack itemstack) { instance.smeltingList.put(Arrays.asList(itemID, metadata), itemstack); instance.temperatureList.put(Arrays.asList(itemID, metadata), temperature); @@ -61,18 +65,18 @@ public class Smeltery * @param item The Source ItemStack * @return The result ItemStack */ - public static ItemStack getSmeltingResult(ItemStack item) + public static LiquidStack getSmeltingResult(ItemStack item) { if (item == null) return null; - ItemStack stack = (ItemStack) instance.smeltingList.get(Arrays.asList(item.itemID, item.getItemDamage())); + LiquidStack stack = (LiquidStack) instance.smeltingList.get(Arrays.asList(item.itemID, item.getItemDamage())); if (stack == null) return null; return stack.copy(); } - public static ItemStack getSmeltingResult(int blockID) + public static LiquidStack getSmeltingResult(int blockID) { return getSmeltingResult(blockID, 0); } @@ -82,9 +86,9 @@ public class Smeltery * @param item The Source ItemStack * @return The result ItemStack */ - public static ItemStack getSmeltingResult(int blockID, int metadata) + public static LiquidStack getSmeltingResult(int blockID, int metadata) { - ItemStack stack = (ItemStack) instance.smeltingList.get(Arrays.asList(blockID, metadata)); + LiquidStack stack = (LiquidStack) instance.smeltingList.get(Arrays.asList(blockID, metadata)); if (stack == null) return null; return stack.copy(); diff --git a/tinker/tconstruct/blocks/CraftedSoilItemBlock.java b/tinker/tconstruct/items/CraftedSoilItemBlock.java similarity index 94% rename from tinker/tconstruct/blocks/CraftedSoilItemBlock.java rename to tinker/tconstruct/items/CraftedSoilItemBlock.java index dc70872a..b9a216c1 100644 --- a/tinker/tconstruct/blocks/CraftedSoilItemBlock.java +++ b/tinker/tconstruct/items/CraftedSoilItemBlock.java @@ -1,4 +1,4 @@ -package tinker.tconstruct.blocks; +package tinker.tconstruct.items; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; diff --git a/tinker/tconstruct/blocks/SearedBrickItemBlock.java b/tinker/tconstruct/items/SearedBrickItemBlock.java similarity index 94% rename from tinker/tconstruct/blocks/SearedBrickItemBlock.java rename to tinker/tconstruct/items/SearedBrickItemBlock.java index 88bd3f50..ecc6b80f 100644 --- a/tinker/tconstruct/blocks/SearedBrickItemBlock.java +++ b/tinker/tconstruct/items/SearedBrickItemBlock.java @@ -1,4 +1,4 @@ -package tinker.tconstruct.blocks; +package tinker.tconstruct.items; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; diff --git a/tinker/tconstruct/blocks/ToolStationItemBlock.java b/tinker/tconstruct/items/ToolStationItemBlock.java similarity index 95% rename from tinker/tconstruct/blocks/ToolStationItemBlock.java rename to tinker/tconstruct/items/ToolStationItemBlock.java index 023d3e77..8cd76273 100644 --- a/tinker/tconstruct/blocks/ToolStationItemBlock.java +++ b/tinker/tconstruct/items/ToolStationItemBlock.java @@ -1,4 +1,4 @@ -package tinker.tconstruct.blocks; +package tinker.tconstruct.items; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; diff --git a/tinker/tconstruct/logic/SmelteryLogic.java b/tinker/tconstruct/logic/SmelteryLogic.java index 90ee8e5a..0f5926a0 100644 --- a/tinker/tconstruct/logic/SmelteryLogic.java +++ b/tinker/tconstruct/logic/SmelteryLogic.java @@ -1,15 +1,16 @@ package tinker.tconstruct.logic; -import net.minecraft.block.Block; +import java.util.ArrayList; + import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Container; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet132TileEntityData; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.liquids.ILiquidTank; import net.minecraftforge.liquids.LiquidStack; @@ -41,6 +42,10 @@ public class SmelteryLogic extends InventoryLogic public int[] activeTemps; public int[] meltingTemps; int tick; + + public ArrayList moltenMetal = new ArrayList(); + int maxLiquid = 10000; + int slag; public SmelteryLogic() { @@ -74,9 +79,29 @@ public class SmelteryLogic extends InventoryLogic } @Override - public void setDirection (byte dir) + public void setDirection (float yaw, float pitch) { - direction = dir; + int facing = MathHelper.floor_double((double)(yaw / 360) + 0.5D) & 3; + switch (facing) + { + case 0: + direction = 2; + break; + + case 1: + direction = 5; + break; + + case 2: + direction = 3; + break; + + case 3: + direction = 4; + break; + } + + //direction = dir; } @Override @@ -91,12 +116,6 @@ public class SmelteryLogic extends InventoryLogic worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - @Override - public boolean canFaceVertical () - { - return false; - } - public int getScaledFuelGague (int scale) { return (fuelGague * scale) / 52; @@ -157,10 +176,12 @@ public class SmelteryLogic extends InventoryLogic activeTemps[i] += 1; else if (meltingTemps[i] >= activeTemps[i]) { - ItemStack result = getResultFor(inventory[i]); + LiquidStack result = getResultFor(inventory[i]); if (result != null) { - inventory[i] = result; + inventory[i] = null; + addMoltenMetal(result); + onInventoryChanged(); //setWorldToInventory(); } } @@ -172,6 +193,26 @@ public class SmelteryLogic extends InventoryLogic } } + void addMoltenMetal(LiquidStack liquid) + { + if (moltenMetal.size() == 0) + moltenMetal.add(liquid); + else + { + boolean added = false; + for (LiquidStack l : moltenMetal) + { + if (l.itemID == liquid.itemID && l.itemMeta == liquid.itemMeta) + { + l.amount += liquid.amount; + added = true; + } + } + if (!added) + moltenMetal.add(liquid); + } + } + void updateTemperatures() { for (int i = 0; i < 9; i++) @@ -201,7 +242,7 @@ public class SmelteryLogic extends InventoryLogic } } - public ItemStack getResultFor (ItemStack stack) + public LiquidStack getResultFor (ItemStack stack) { return Smeltery.instance.getSmeltingResult(stack); } @@ -219,102 +260,6 @@ public class SmelteryLogic extends InventoryLogic worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } - /*@Override - public void setInventorySlotContents (int slot, ItemStack itemstack) - { - super.setInventorySlotContents(slot, itemstack); - setWorldToInventory(); - } - - @Override - public ItemStack decrStackSize (int slot, int quantity) - { - ItemStack stack = super.decrStackSize(slot, quantity); - setWorldToInventory(); - return stack; - }*/ - - /* World-inventory matching */ - /*void matchInventoryToWorld () - { - switch (getDirection()) - { - case 2: // +z - grabWorldBlocks(xCoord, yCoord, zCoord + 2); - break; - case 3: // -z - grabWorldBlocks(xCoord, yCoord, zCoord - 2); - break; - case 4: // +x - grabWorldBlocks(xCoord + 2, yCoord, zCoord); - break; - case 5: // -x - grabWorldBlocks(xCoord - 2, yCoord, zCoord); - break; - } - }*/ - - /*void setWorldToInventory () - { - switch (getDirection()) - { - case 2: // +z - setWorldToInventory(xCoord, yCoord, zCoord + 2); - break; - case 3: // -z - setWorldToInventory(xCoord, yCoord, zCoord - 2); - break; - case 4: // +x - setWorldToInventory(xCoord + 2, yCoord, zCoord); - break; - case 5: // -x - setWorldToInventory(xCoord - 2, yCoord, zCoord); - break; - } - }*/ - - /*public void grabWorldBlocks (int x, int y, int z) - { - for (int xPos = 0; xPos <= 2; xPos++) - { - for (int zPos = 0; zPos <= 2; zPos++) - { - int bID = worldObj.getBlockId(xPos + x - 1, y, zPos + z - 1); - int md = worldObj.getBlockMetadata(xPos + x - 1, y, zPos + z - 1); - - ItemStack stack = inventory[xPos + zPos * 3]; - if (stack == null) - { - if (bID == 0) - inventory[xPos + zPos * 3] = null; - else if (stack == null || (stack.itemID != bID && stack.getItemDamage() != md)) - inventory[xPos + zPos * 3] = new ItemStack(bID, 1, md); - } - } - } - }*/ - - /*public void setWorldToInventory (int x, int y, int z) - { - for (int xPos = 0; xPos <= 2; xPos++) - { - for (int zPos = 0; zPos <= 2; zPos++) - { - ItemStack stack = inventory[xPos + zPos * 3]; - if (stack == null) - worldObj.setBlockWithNotify(xPos + x - 1, y, zPos + z - 1, 0); - - else if (stack.getItem() instanceof ItemBlock && Block.blocksList[stack.itemID] != null) - { - worldObj.setBlockAndMetadataWithNotify(xPos + x - 1, y, zPos + z - 1, stack.itemID, stack.getItemDamage()); - meltingTemps[xPos + zPos * 3] = Smeltery.instance.getSmeltingTemperature(stack); - if (meltingTemps[xPos + zPos * 3] < bottomTemps[xPos + zPos * 3]) - bottomTemps[xPos + zPos * 3] = meltingTemps[xPos + zPos * 3]; - } - } - } - }*/ - public void checkValidPlacement () { switch (getDirection()) diff --git a/tinker/tconstruct/worldgen/ManhattanOreGenerator.java b/tinker/tconstruct/worldgen/ManhattanOreGenerator.java index 8d44bf19..ea1d7c6e 100644 --- a/tinker/tconstruct/worldgen/ManhattanOreGenerator.java +++ b/tinker/tconstruct/worldgen/ManhattanOreGenerator.java @@ -26,6 +26,8 @@ public class ManhattanOreGenerator extends WorldGenerator private boolean generateLines; private boolean checkGenMinable; + List possibleMoves = new ArrayList(); + public ManhattanOreGenerator(int id, int meta, int minSize, int maxSize, int dense, boolean lines, boolean replaceGenMinable, Object... replacableIDs) { minableBlockId = id; @@ -40,6 +42,29 @@ public class ManhattanOreGenerator extends WorldGenerator { replaceableBlocks.add((Integer) i); } + initPossibleMoves(); + } + + void initPossibleMoves() + { + possibleMoves.add(new Integer[] {1, 0, 0}); + possibleMoves.add(new Integer[] {0, 1, 0}); + possibleMoves.add(new Integer[] {0, 0, 1}); + possibleMoves.add(new Integer[] {-1, 0, 0}); + possibleMoves.add(new Integer[] {0, -1, 0}); + possibleMoves.add(new Integer[] {0, 0, -1}); + possibleMoves.add(new Integer[] {1, 1, 0}); + possibleMoves.add(new Integer[] {-1, 1, 0}); + possibleMoves.add(new Integer[] {1, -1, 0}); + possibleMoves.add(new Integer[] {-1, -1, 0}); + possibleMoves.add(new Integer[] {1, 0, 1}); + possibleMoves.add(new Integer[] {-1, 0, 1}); + possibleMoves.add(new Integer[] {1, 0, -1}); + possibleMoves.add(new Integer[] {-1, 0, -1}); + possibleMoves.add(new Integer[] {0, 1, 1}); + possibleMoves.add(new Integer[] {0, -1, 1}); + possibleMoves.add(new Integer[] {0, 1, -1}); + possibleMoves.add(new Integer[] {0, -1, -1}); } public boolean spawnOre(World world, Integer[] coords) @@ -74,38 +99,16 @@ public class ManhattanOreGenerator extends WorldGenerator @Override public int compare(Integer[] arg0, Integer[] arg1) { return (arg0[0] - arg1[0]) + (arg0[1] - arg1[1]) + (arg0[2] - arg1[2]); - } - + } } @Override public boolean generate(World world, Random random, int x, int y, int z) { - //List spawnedCoords = new ArrayList(); SortedList sortedList = new SortedList(new CompareCoordinates()); spawnOre(world, x, y, z); - sortedList.add(new Integer[] {x, y, z}); - - List possibleMoves = new ArrayList(); - possibleMoves.add(new Integer[] {1, 0, 0}); - possibleMoves.add(new Integer[] {0, 1, 0}); - possibleMoves.add(new Integer[] {0, 0, 1}); - possibleMoves.add(new Integer[] {-1, 0, 0}); - possibleMoves.add(new Integer[] {0, -1, 0}); - possibleMoves.add(new Integer[] {0, 0, -1}); - possibleMoves.add(new Integer[] {1, 1, 0}); - possibleMoves.add(new Integer[] {-1, 1, 0}); - possibleMoves.add(new Integer[] {1, -1, 0}); - possibleMoves.add(new Integer[] {-1, -1, 0}); - possibleMoves.add(new Integer[] {1, 0, 1}); - possibleMoves.add(new Integer[] {-1, 0, 1}); - possibleMoves.add(new Integer[] {1, 0, -1}); - possibleMoves.add(new Integer[] {-1, 0, -1}); - possibleMoves.add(new Integer[] {0, 1, 1}); - possibleMoves.add(new Integer[] {0, -1, 1}); - possibleMoves.add(new Integer[] {0, 1, -1}); - possibleMoves.add(new Integer[] {0, -1, -1}); + sortedList.add(new Integer[] {x, y, z}); int trueSize = 1; int randomSize = this.numberOfBlocks + random.nextInt(this.sizeVariance); @@ -117,7 +120,7 @@ public class ManhattanOreGenerator extends WorldGenerator int pickedOre = (int) (((random.nextFloat()*random.nextFloat())) * sortedList.size()); if (!generateLines) - pickedOre = sortedList.size()-1; //Comment this line to create groups instead of lines + pickedOre = sortedList.size()-1; Integer[] coords = sortedList.get(pickedOre); Integer[] finalCoords = {coords[0], coords[1], coords[2]}; @@ -135,11 +138,11 @@ public class ManhattanOreGenerator extends WorldGenerator cpm.remove(pick); } while(sortedList.contains(finalCoords)); - if(random.nextInt(100) < density) - { + //if(random.nextInt(100) < density) + //{ spawnOre(world, finalCoords); trueSize++; - } + //} sortedList.add(finalCoords); }