diff --git a/resources/assets/tinker/lang/en_US.lang b/resources/assets/tinker/lang/en_US.lang index 8a6bac65358..f7e3925894a 100644 --- a/resources/assets/tinker/lang/en_US.lang +++ b/resources/assets/tinker/lang/en_US.lang @@ -118,6 +118,8 @@ tile.cloth.green.slab.name=Green Wool Slab tile.cloth.red.slab.name=Red Wool Slab tile.cloth.black.slab.name=Black Wool Slab +tile.GlueBlock.name=Glue Block + item.oreberry.iron.name=Iron Oreberry item.oreberry.gold.name=Gold Oreberry item.oreberry.copper.name=Copper Oreberry @@ -204,6 +206,7 @@ item.tconstruct.MetalPattern.bowstring.name=Bowstring Cast item.tconstruct.MetalPattern.fletching.name=Fletching Cast item.tconstruct.MetalPattern.arrowhead.name=Arrowhead Cast item.tconstruct.MetalPattern.ingot.name=Ingot Cast +item.tconstruct.MetalPattern.gem.name=Gem Cast item.tconstruct.Materials.PaperStack.name=Paper Stack item.tconstruct.Materials.SlimeCrystal.name=Slime Crystal diff --git a/resources/assets/tinker/textures/blocks/compressed_alubrass.png b/resources/assets/tinker/textures/blocks/compressed_alubrass.png index 9f76af182a8..90f0329e0ed 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_alubrass.png and b/resources/assets/tinker/textures/blocks/compressed_alubrass.png differ diff --git a/resources/assets/tinker/textures/blocks/compressed_alumite.png b/resources/assets/tinker/textures/blocks/compressed_alumite.png index 475b8b7df3e..d01bb421b4d 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_alumite.png and b/resources/assets/tinker/textures/blocks/compressed_alumite.png differ diff --git a/resources/assets/tinker/textures/blocks/compressed_ardite.png b/resources/assets/tinker/textures/blocks/compressed_ardite.png index dea374356f8..4804615e127 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_ardite.png and b/resources/assets/tinker/textures/blocks/compressed_ardite.png differ diff --git a/resources/assets/tinker/textures/blocks/compressed_cobalt.png b/resources/assets/tinker/textures/blocks/compressed_cobalt.png index 65c4eeee6fc..1aa1e1952b2 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_cobalt.png and b/resources/assets/tinker/textures/blocks/compressed_cobalt.png differ diff --git a/resources/assets/tinker/textures/blocks/compressed_ender.png b/resources/assets/tinker/textures/blocks/compressed_ender.png index b7e9bbbc938..ac36a3f0478 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_ender.png and b/resources/assets/tinker/textures/blocks/compressed_ender.png differ diff --git a/resources/assets/tinker/textures/blocks/compressed_manyullyn.png b/resources/assets/tinker/textures/blocks/compressed_manyullyn.png index 7722c8d90c6..5f54d305f3a 100644 Binary files a/resources/assets/tinker/textures/blocks/compressed_manyullyn.png and b/resources/assets/tinker/textures/blocks/compressed_manyullyn.png differ diff --git a/resources/assets/tinker/textures/blocks/glue.png b/resources/assets/tinker/textures/blocks/glue.png new file mode 100644 index 00000000000..47ce56eed16 Binary files /dev/null and b/resources/assets/tinker/textures/blocks/glue.png differ diff --git a/resources/assets/tinker/textures/items/materials/cast_gem.png b/resources/assets/tinker/textures/items/materials/cast_gem.png new file mode 100644 index 00000000000..5ba859fec36 Binary files /dev/null and b/resources/assets/tinker/textures/items/materials/cast_gem.png differ diff --git a/src/main/java/tconstruct/blocks/BloodBlock.java b/src/main/java/tconstruct/blocks/BloodBlock.java new file mode 100644 index 00000000000..ef5511c0771 --- /dev/null +++ b/src/main/java/tconstruct/blocks/BloodBlock.java @@ -0,0 +1,27 @@ +package tconstruct.blocks; + +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.world.World; +import net.minecraftforge.fluids.Fluid; + +public class BloodBlock extends TConstructFluid +{ + + public BloodBlock(int id, Fluid fluid, Material material, String texture) + { + super(id, fluid, material, texture); + } + + public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity) + { + if (entity instanceof EntityLivingBase) + { + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 200, 0)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.poison.id, 20*10, 4)); + } + } +} diff --git a/src/main/java/tconstruct/blocks/GlueBlock.java b/src/main/java/tconstruct/blocks/GlueBlock.java new file mode 100644 index 00000000000..94b425f8b4a --- /dev/null +++ b/src/main/java/tconstruct/blocks/GlueBlock.java @@ -0,0 +1,48 @@ +package tconstruct.blocks; + +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; + +public class GlueBlock extends TConstructBlock { + + public GlueBlock(int id) + { + super(id, Material.ground, 4.0f, new String[]{"glue"}); + } + + @Override + public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity) + { + entity.motionX *= 0.1; + entity.motionZ *= 0.1; + + if (entity instanceof EntityLivingBase) { + EntityLivingBase lvb = (EntityLivingBase)entity; + // Well you'd feel ill too standing on glue... + if (lvb.isPotionActive(Potion.hunger)) { + lvb.getActivePotionEffect(Potion.hunger).duration = 20; + } else { + lvb.addPotionEffect(new PotionEffect(Potion.hunger.getId(), 20, 4)); + } + + // Glue is sticky stuff + if (lvb.isPotionActive(Potion.moveSlowdown)) { + lvb.getActivePotionEffect(Potion.moveSlowdown).duration = 30; + } else { + lvb.addPotionEffect(new PotionEffect(Potion.moveSlowdown.getId(), 30, 4)); + } + } + } + + public AxisAlignedBB getCollisionBoundingBoxFromPool (World world, int x, int y, int z) + { + return Block.slowSand.getCollisionBoundingBoxFromPool(world, x, y, z); + } + +} diff --git a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java index 057695eaac9..72284e2a24d 100644 --- a/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/blocks/logic/SmelteryLogic.java @@ -9,6 +9,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.monster.EntityIronGolem; import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; @@ -313,11 +314,11 @@ void detectEntities () if (o instanceof EntityVillager) { EntityVillager villager = (EntityVillager) o; - if (villager.attackEntityFrom(new SmelteryDamageSource(), 1)) + if (villager.attackEntityFrom(new SmelteryDamageSource(), 5)) { - if (currentLiquid + 8 < maxLiquid) + if (currentLiquid + 40 < maxLiquid) { - int amount = villager.isChild() ? 1 : 8; + int amount = villager.isChild() ? 5 : 40; this.fill(new FluidStack(TContent.moltenEmeraldFluid, amount), true); } } @@ -325,22 +326,33 @@ void detectEntities () else if (o instanceof EntityEnderman) { EntityEnderman villager = (EntityEnderman) o; - if (villager.attackEntityFrom(new SmelteryDamageSource(), 1)) + if (villager.attackEntityFrom(new SmelteryDamageSource(), 5)) { - if (currentLiquid + 25 < maxLiquid) + if (currentLiquid + 125 < maxLiquid) { - this.fill(new FluidStack(TContent.moltenEnderFluid, 25), true); + this.fill(new FluidStack(TContent.moltenEnderFluid, 125), true); + } + } + } + else if (o instanceof EntityIronGolem) + { + EntityIronGolem golem = (EntityIronGolem) o; + if (golem.attackEntityFrom(new SmelteryDamageSource(), 5)) + { + if (currentLiquid + 40 < maxLiquid) + { + this.fill(new FluidStack(TContent.moltenIronFluid, 40), true); } } } else if (o instanceof EntityLivingBase) { EntityLivingBase living = (EntityLivingBase) o; - if (living.attackEntityFrom(new SmelteryDamageSource(), 1)) + if (living.attackEntityFrom(new SmelteryDamageSource(), 5)) { - if (currentLiquid + 8 < maxLiquid) + if (currentLiquid + 40 < maxLiquid) { - int amount = (living.isChild() || living instanceof EntityPlayer) ? 1 : 8; + int amount = (living.isChild() || living instanceof EntityPlayer) ? 5 : 40; this.fill(new FluidStack(TContent.bloodFluid, amount), true); } } @@ -952,7 +964,7 @@ public FluidStack drain (int maxDrain, boolean doDrain) } else { - if (doDrain) + if (doDrain && maxDrain > 0) { liquid.amount -= maxDrain; worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); @@ -977,7 +989,7 @@ public int fill (FluidStack resource, boolean doFill) resource.amount = maxLiquid - currentLiquid; int amount = resource.amount; - if (doFill) + if (amount > 0 && doFill) { if (addMoltenMetal(resource, false)) { diff --git a/src/main/java/tconstruct/blocks/slime/SlimeGel.java b/src/main/java/tconstruct/blocks/slime/SlimeGel.java index 0e9f4bdcc08..65c660b570d 100644 --- a/src/main/java/tconstruct/blocks/slime/SlimeGel.java +++ b/src/main/java/tconstruct/blocks/slime/SlimeGel.java @@ -53,7 +53,7 @@ public void onEntityCollidedWithBlock (World world, int x, int y, int z, Entity entity.motionY *= -1.2F; if (entity instanceof EntityLivingBase) { - ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 4)); + ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(Potion.jump.id, 1, 2)); } } entity.fallDistance = 0; diff --git a/src/main/java/tconstruct/client/TClientEvents.java b/src/main/java/tconstruct/client/TClientEvents.java index 168ebed08fd..22437194a1c 100644 --- a/src/main/java/tconstruct/client/TClientEvents.java +++ b/src/main/java/tconstruct/client/TClientEvents.java @@ -69,7 +69,6 @@ public void preStitch (TextureStitchEvent.Pre event) { stillIcons[0] = register.registerIcon("tinker:liquid_pigiron"); flowIcons[0] = register.registerIcon("tinker:liquid_pigiron"); - System.out.println("Icons: "+stillIcons[0]+" "+flowIcons[0]); } } @@ -97,125 +96,129 @@ public void postStitch (TextureStitchEvent.Post event) @ForgeSubscribe public void renderHealthbar (RenderGameOverlayEvent.Pre event) { - if (event.type == ElementType.HEALTH && !Loader.isModLoaded("tukmc_Vz")) // Loader check to avoid conflicting with a GUI mod (thanks Vazkii!) + if (!Loader.isModLoaded("tukmc_Vz"))// Loader check to avoid conflicting with a GUI mod (thanks Vazkii!) { - event.setCanceled(true); - updateCounter++; - - ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); - int scaledWidth = scaledresolution.getScaledWidth(); - int scaledHeight = scaledresolution.getScaledHeight(); - int xBasePos = scaledWidth / 2 - 91; - int yBasePos = scaledHeight - 39; - TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(mc.thePlayer.username); - - boolean highlight = mc.thePlayer.hurtResistantTime / 3 % 2 == 1; - - if (mc.thePlayer.hurtResistantTime < 10) + if (event.type == ElementType.HEALTH) { - highlight = false; - } - - AttributeInstance attrMaxHealth = this.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth); - int health = MathHelper.ceiling_float_int(mc.thePlayer.getHealth()); - int healthLast = MathHelper.ceiling_float_int(mc.thePlayer.prevHealth); - float healthMax = (float) attrMaxHealth.getAttributeValue(); - if (healthMax > 20) - healthMax = 20; - float absorb = this.mc.thePlayer.getAbsorptionAmount(); + updateCounter++; - int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F); - int rowHeight = Math.max(10 - (healthRows - 2), 3); + ScaledResolution scaledresolution = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); + int scaledWidth = scaledresolution.getScaledWidth(); + int scaledHeight = scaledresolution.getScaledHeight(); + int xBasePos = scaledWidth / 2 - 91; + int yBasePos = scaledHeight - 39; + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(mc.thePlayer.username); - this.rand.setSeed((long) (updateCounter * 312871)); + boolean highlight = mc.thePlayer.hurtResistantTime / 3 % 2 == 1; - int left = scaledWidth / 2 - 91; - int top = scaledHeight - left_height; - - int regen = -1; - if (mc.thePlayer.isPotionActive(Potion.regeneration)) - { - regen = updateCounter % 25; - } + if (mc.thePlayer.hurtResistantTime < 10) + { + highlight = false; + } - final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0); - final int BACKGROUND = (highlight ? 25 : 16); - int MARGIN = 16; - if (mc.thePlayer.isPotionActive(Potion.poison)) - MARGIN += 36; - else if (mc.thePlayer.isPotionActive(Potion.wither)) - MARGIN += 72; - float absorbRemaining = absorb; + AttributeInstance attrMaxHealth = this.mc.thePlayer.getEntityAttribute(SharedMonsterAttributes.maxHealth); + int health = MathHelper.ceiling_float_int(mc.thePlayer.getHealth()); + int healthLast = MathHelper.ceiling_float_int(mc.thePlayer.prevHealth); + float healthMax = (float) attrMaxHealth.getAttributeValue(); + if (healthMax > 20) + healthMax = 20; + float absorb = this.mc.thePlayer.getAbsorptionAmount(); - for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i) - { - int b0 = (highlight ? 1 : 0); - int row = MathHelper.ceiling_float_int((float) (i + 1) / 10.0F) - 1; - int x = left + i % 10 * 8; - int y = top - row * rowHeight; + int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F); + int rowHeight = Math.max(10 - (healthRows - 2), 3); - if (health <= 4) - y += rand.nextInt(2); - if (i == regen) - y -= 2; + this.rand.setSeed((long) (updateCounter * 312871)); - drawTexturedModalRect(x, y, BACKGROUND, TOP, 9, 9); + int left = scaledWidth / 2 - 91; + int top = scaledHeight - left_height; - if (highlight) + int regen = -1; + if (mc.thePlayer.isPotionActive(Potion.regeneration)) { - if (i * 2 + 1 < healthLast) - drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6 - else if (i * 2 + 1 == healthLast) - drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7 + regen = updateCounter % 25; } - if (absorbRemaining > 0.0F) + final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0); + final int BACKGROUND = (highlight ? 25 : 16); + int MARGIN = 16; + if (mc.thePlayer.isPotionActive(Potion.poison)) + MARGIN += 36; + else if (mc.thePlayer.isPotionActive(Potion.wither)) + MARGIN += 72; + float absorbRemaining = absorb; + + for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i) { - if (absorbRemaining == absorb && absorb % 2.0F == 1.0F) - drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17 + int b0 = (highlight ? 1 : 0); + int row = MathHelper.ceiling_float_int((float) (i + 1) / 10.0F) - 1; + int x = left + i % 10 * 8; + int y = top - row * rowHeight; + + if (health <= 4) + y += rand.nextInt(2); + if (i == regen) + y -= 2; + + drawTexturedModalRect(x, y, BACKGROUND, TOP, 9, 9); + + if (highlight) + { + if (i * 2 + 1 < healthLast) + drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6 + else if (i * 2 + 1 == healthLast) + drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7 + } + + if (absorbRemaining > 0.0F) + { + if (absorbRemaining == absorb && absorb % 2.0F == 1.0F) + drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17 + else + drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16 + absorbRemaining -= 2.0F; + } else - drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16 - absorbRemaining -= 2.0F; + { + if (i * 2 + 1 < health) + drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4 + else if (i * 2 + 1 == health) + drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5 + } } - else - { - if (i * 2 + 1 < health) - drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4 - else if (i * 2 + 1 == health) - drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5 - } - } - PotionEffect potion = mc.thePlayer.getActivePotionEffect(Potion.wither); - if (potion != null) - return; - potion = mc.thePlayer.getActivePotionEffect(Potion.poison); - if (potion != null) - return; + PotionEffect potion = mc.thePlayer.getActivePotionEffect(Potion.wither); + if (potion != null) + return; + potion = mc.thePlayer.getActivePotionEffect(Potion.poison); + if (potion != null) + return; - //Extra hearts - this.mc.getTextureManager().bindTexture(hearts); + //Extra hearts + this.mc.getTextureManager().bindTexture(hearts); - int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth()); - for (int iter = 0; iter < hp / 20; iter++) - { - int renderHearts = (hp - 20 * (iter + 1)) / 2; - if (renderHearts > 10) - renderHearts = 10; - for (int i = 0; i < renderHearts; i++) - { - this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos, 0 + 18 * iter, 0, 8, 8); - } - if (hp % 2 == 1 && renderHearts < 10) + int hp = MathHelper.ceiling_float_int(this.mc.thePlayer.getHealth()); + for (int iter = 0; iter < hp / 20; iter++) { - this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos, 9 + 18 * iter, 0, 8, 8); + int renderHearts = (hp - 20 * (iter + 1)) / 2; + if (renderHearts > 10) + renderHearts = 10; + for (int i = 0; i < renderHearts; i++) + { + this.drawTexturedModalRect(xBasePos + 8 * i, yBasePos, 0 + 18 * iter, 0, 8, 8); + } + if (hp % 2 == 1 && renderHearts < 10) + { + this.drawTexturedModalRect(xBasePos + 8 * renderHearts, yBasePos, 9 + 18 * iter, 0, 8, 8); + } } - } - this.mc.getTextureManager().bindTexture(icons); - GuiIngameForge.left_height += 10; - if (absorb > 0) + this.mc.getTextureManager().bindTexture(icons); GuiIngameForge.left_height += 10; + if (absorb > 0) + GuiIngameForge.left_height += 10; + + event.setCanceled(true); + } } } diff --git a/src/main/java/tconstruct/client/gui/SmelteryGui.java b/src/main/java/tconstruct/client/gui/SmelteryGui.java index 34ad2896346..9b4913840e0 100644 --- a/src/main/java/tconstruct/client/gui/SmelteryGui.java +++ b/src/main/java/tconstruct/client/gui/SmelteryGui.java @@ -281,7 +281,7 @@ public List getLiquidTooltip (FluidStack liquid, boolean par2) list.add("\u00A7f" + name); if (name.equals("Liquified Emerald")) { - list.add("Emeralds: " + liquid.amount / 320f); + list.add("Emeralds: " + liquid.amount / 640f); } else if (name.equals("Molten Glass")) { diff --git a/src/main/java/tconstruct/common/TContent.java b/src/main/java/tconstruct/common/TContent.java index 929414dd304..7c028a27098 100644 --- a/src/main/java/tconstruct/common/TContent.java +++ b/src/main/java/tconstruct/common/TContent.java @@ -158,6 +158,7 @@ public class TContent implements IFuelHandler public static Block meatBlock; public static Block woolSlab1; public static Block woolSlab2; + public static Block glueBlock; //Traps public static Block landmine; @@ -378,6 +379,10 @@ void registerBlocks () LanguageRegistry.addName(meatBlock, "Hambone"); GameRegistry.addRecipe(new ItemStack(meatBlock), "mmm", "mbm", "mmm", 'b', new ItemStack(Item.bone), 'm', new ItemStack(Item.porkRaw)); + glueBlock = new GlueBlock(PHConstruct.glueBlock).setUnlocalizedName("GlueBlock").setCreativeTab(TConstructRegistry.blockTab); + GameRegistry.registerBlock(glueBlock, "GlueBlock"); + OreDictionary.registerOre("blockRubber", new ItemStack(glueBlock)); + woolSlab1 = new SlabBase(PHConstruct.woolSlab1, Material.cloth, Block.cloth, 0, 8).setUnlocalizedName("cloth"); woolSlab1.setStepSound(Block.soundClothFootstep).setCreativeTab(CreativeTabs.tabDecorations); GameRegistry.registerBlock(woolSlab1, WoolSlab1Item.class, "WoolSlab1"); @@ -613,7 +618,7 @@ void registerBlocks () bloodFluid = new Fluid("blood"); if (!FluidRegistry.registerFluid(bloodFluid)) bloodFluid = FluidRegistry.getFluid("blood"); - blood = new TConstructFluid(PHConstruct.blood, bloodFluid, Material.water, "liquid_cow").setUnlocalizedName("liquid.blood"); + blood = new BloodBlock(PHConstruct.blood, bloodFluid, Material.water, "liquid_cow").setUnlocalizedName("liquid.blood"); GameRegistry.registerBlock(blood, "liquid.blood"); fluids[16] = bloodFluid; fluidBlocks[16] = blood; @@ -807,15 +812,21 @@ void registerBlocks () void registerItems () { titleIcon = new TitleIcon(PHConstruct.uselessItem).setUnlocalizedName("tconstruct.titleicon"); + GameRegistry.registerItem(titleIcon, "titleIcon"); String[] blanks = new String[] { "blank_pattern", "blank_cast", "blank_cast" }; blankPattern = new CraftingItem(PHConstruct.blankPattern, blanks, blanks, "materials/").setUnlocalizedName("tconstruct.Pattern"); + GameRegistry.registerItem(blankPattern, "blankPattern"); materials = new MaterialItem(PHConstruct.materials).setUnlocalizedName("tconstruct.Materials"); toolRod = new ToolPart(PHConstruct.toolRod, "_rod", "ToolRod").setUnlocalizedName("tconstruct.ToolRod"); toolShard = new ToolShard(PHConstruct.toolShard, "_chunk").setUnlocalizedName("tconstruct.ToolShard"); - woodPattern = new Pattern(PHConstruct.woodPattern, "WoodPattern", "pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern"); - metalPattern = new MetalPattern(PHConstruct.metalPattern, "MetalPattern", "cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern"); - armorPattern = new ArmorPattern(PHConstruct.armorPattern, "ArmorPattern", "armorcast_", "materials/").setUnlocalizedName("tconstruct.ArmorPattern"); + woodPattern = new Pattern(PHConstruct.woodPattern, "pattern_", "materials/").setUnlocalizedName("tconstruct.Pattern"); + metalPattern = new MetalPattern(PHConstruct.metalPattern, "cast_", "materials/").setUnlocalizedName("tconstruct.MetalPattern"); + armorPattern = new ArmorPattern(PHConstruct.armorPattern, "armorcast_", "materials/").setUnlocalizedName("tconstruct.ArmorPattern"); + GameRegistry.registerItem(materials, "materials"); + GameRegistry.registerItem(woodPattern, "woodPattern"); + GameRegistry.registerItem(metalPattern, "metalPattern"); + GameRegistry.registerItem(armorPattern, "armorPattern"); TConstructRegistry.addItemToDirectory("blankPattern", blankPattern); TConstructRegistry.addItemToDirectory("woodPattern", woodPattern); @@ -840,7 +851,9 @@ void registerItems () } manualBook = new Manual(PHConstruct.manual); + GameRegistry.registerItem(manualBook, "manualBook"); buckets = new FilledBucket(PHConstruct.buckets); + GameRegistry.registerItem(buckets, "buckets"); pickaxe = new Pickaxe(PHConstruct.pickaxe); shovel = new Shovel(PHConstruct.shovel); @@ -866,16 +879,18 @@ void registerItems () shortbow = new Shortbow(PHConstruct.shortbow); arrow = new Arrow(PHConstruct.arrow); - Item[] tools = { pickaxe, shovel, hatchet, broadsword, longsword, rapier, cutlass, frypan, battlesign, mattock, chisel, lumberaxe, cleaver, scythe, excavator, hammer, battleaxe }; - String[] toolStrings = { "pickaxe", "shovel", "hatchet", "broadsword", "longsword", "rapier", "cutlass", "frypan", "battlesign", "mattock", "chisel", "lumberaxe", "cleaver", "scythe", - "excavator", "hammer", "battleaxe" }; + Item[] tools = { pickaxe, shovel, hatchet, broadsword, longsword, rapier, dagger, cutlass, frypan, battlesign, mattock, chisel, lumberaxe, cleaver, scythe, excavator, hammer, battleaxe, shortbow, arrow }; + String[] toolStrings = { "pickaxe", "shovel", "hatchet", "broadsword", "longsword", "rapier", "dagger", "cutlass", "frypan", "battlesign", "mattock", "chisel", "lumberaxe", "cleaver", "scythe", + "excavator", "hammer", "battleaxe", "shortbow", "arrow" }; for (int i = 0; i < tools.length; i++) { + GameRegistry.registerItem(tools[i], toolStrings[i]); // 1.7 compat TConstructRegistry.addItemToDirectory(toolStrings[i], tools[i]); } potionLauncher = new PotionLauncher(PHConstruct.potionLauncher).setUnlocalizedName("tconstruct.PotionLauncher"); + GameRegistry.registerItem(potionLauncher, "potionLauncher"); pickaxeHead = new ToolPart(PHConstruct.pickaxeHead, "_pickaxe_head", "PickHead").setUnlocalizedName("tconstruct.PickaxeHead"); shovelHead = new ToolPart(PHConstruct.shovelHead, "_shovel_head", "ShovelHead").setUnlocalizedName("tconstruct.ShovelHead"); @@ -914,14 +929,19 @@ void registerItems () for (int i = 0; i < toolParts.length; i++) { + GameRegistry.registerItem(toolParts[i], toolPartStrings[i]); // 1.7 compat TConstructRegistry.addItemToDirectory(toolPartStrings[i], toolParts[i]); } diamondApple = new DiamondApple(PHConstruct.diamondApple).setUnlocalizedName("tconstruct.apple.diamond"); strangeFood = new StrangeFood(PHConstruct.slimefood).setUnlocalizedName("tconstruct.strangefood"); oreBerries = new OreBerries(PHConstruct.oreChunks).setUnlocalizedName("oreberry"); + GameRegistry.registerItem(diamondApple, "diamondApple"); + GameRegistry.registerItem(strangeFood, "strangeFood"); + GameRegistry.registerItem(oreBerries, "oreBerries"); jerky = new Jerky(PHConstruct.jerky, Loader.isModLoaded("HungerOverhaul")).setUnlocalizedName("tconstruct.jerky"); + GameRegistry.registerItem(jerky, "jerky"); //Wearables //heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet, 0).setUnlocalizedName("tconstruct.HeavyHelmet"); @@ -930,6 +950,12 @@ void registerItems () //glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); knapsack = new Knapsack(PHConstruct.knapsack).setUnlocalizedName("tconstruct.storage"); goldHead = new GoldenHead(PHConstruct.goldHead, 4, 1.2F, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 10, 0, 1.0F).setUnlocalizedName("goldenhead"); + //GameRegistry.registerItem(heavyHelmet, "heavyHelmet"); + GameRegistry.registerItem(heartCanister, "heartCanister"); + //GameRegistry.registerItem(heavyBoots, "heavyBoots"); + //GameRegistry.registerItem(glove, "glove"); + GameRegistry.registerItem(knapsack, "knapsack"); + GameRegistry.registerItem(goldHead, "goldHead"); LiquidCasting basinCasting = TConstruct.getBasinCasting(); materialWood = EnumHelper.addArmorMaterial("WOOD", 2, new int[] { 1, 2, 2, 1 }, 3); @@ -937,6 +963,10 @@ void registerItems () chestplateWood = new ArmorBasic(PHConstruct.woodChestplate, materialWood, 1, "wood").setUnlocalizedName("tconstruct.chestplateWood"); leggingsWood = new ArmorBasic(PHConstruct.woodPants, materialWood, 2, "wood").setUnlocalizedName("tconstruct.leggingsWood"); bootsWood = new ArmorBasic(PHConstruct.woodBoots, materialWood, 3, "wood").setUnlocalizedName("tconstruct.bootsWood"); + GameRegistry.registerItem(helmetWood, "helmetWood"); + GameRegistry.registerItem(chestplateWood, "chestplateWood"); + GameRegistry.registerItem(leggingsWood, "leggingsWood"); + GameRegistry.registerItem(bootsWood, "bootsWood"); // essenceCrystal = new EssenceCrystal(PHConstruct.essenceCrystal).setUnlocalizedName("tconstruct.crystal.essence"); @@ -996,7 +1026,7 @@ void registerMaterials () TConstructRegistry.addToolMaterial(15, "Alumite", 4, 550, 800, 3, 1.3F, 2, 0f, "\u00A7d", ""); TConstructRegistry.addToolMaterial(16, "Steel", 4, 750, 800, 3, 1.3F, 2, 0f, "", ""); TConstructRegistry.addToolMaterial(17, "BlueSlime", "Slime ", 0, 1200, 150, 0, 2.0F, 0, 0f, "\u00A7b", ""); - TConstructRegistry.addToolMaterial(18, "PigIron", "Pig Iron ", 3, 150, 600, 2, 1.1F, 1, 0f, "\u00A7c", "Tasty"); + TConstructRegistry.addToolMaterial(18, "PigIron", "Pig Iron ", 3, 250, 600, 2, 1.3F, 1, 0f, "\u00A7c", "Tasty"); TConstructRegistry.addBowMaterial(0, 384, 20, 1.0f); //Wood TConstructRegistry.addBowMaterial(1, 10, 80, 0.2f); //Stone @@ -1343,7 +1373,6 @@ private void addRecipesForCraftingTable () GameRegistry.addShapelessRecipe(new ItemStack(Block.cloth, 1, sc), new ItemStack(woolSlab1, 1, sc), new ItemStack(woolSlab1, 1, sc)); GameRegistry.addShapelessRecipe(new ItemStack(Block.cloth, 1, sc + 8), new ItemStack(woolSlab2, 1, sc), new ItemStack(woolSlab2, 1, sc)); } - GameRegistry.addRecipe(new ItemStack(woolSlab1, 6, 0), "www", 'w', new ItemStack(Block.cloth, 1, Short.MAX_VALUE)); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.cloth, 1, 0), "slabCloth", "slabCloth")); //Trap Recipes GameRegistry.addRecipe(new ItemStack(punji, 5, 0), "b b", " b ", "b b", 'b', new ItemStack(Item.reed)); @@ -1415,7 +1444,7 @@ private void addPartMapping () { /* Tools */ patternOutputs = new Item[] { toolRod, pickaxeHead, shovelHead, hatchetHead, swordBlade, wideGuard, handGuard, crossbar, binding, frypanHead, signHead, knifeBlade, chiselHead, toughRod, - toughBinding, largePlate, broadAxeHead, scytheBlade, excavatorHead, largeSwordBlade, hammerHead, fullGuard, null, null, arrowhead }; + toughBinding, largePlate, broadAxeHead, scytheBlade, excavatorHead, largeSwordBlade, hammerHead, fullGuard, null, null, arrowhead, null }; int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 }; @@ -1543,13 +1572,19 @@ private void addRecipesForTableCasting () { /* Smeltery */ ItemStack ingotcast = new ItemStack(metalPattern, 1, 0); + ItemStack gemcast = new ItemStack(metalPattern, 1, 26); LiquidCasting tableCasting = TConstructRegistry.instance.getTableCasting(); //Blank tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 1), new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue), 80); tableCasting.addCastingRecipe(new ItemStack(blankPattern, 1, 2), new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 2), 80); + tableCasting.addCastingRecipe(gemcast, new FluidStack(moltenAlubrassFluid, TConstruct.ingotLiquidValue), new ItemStack(Item.emerald), 80); + tableCasting.addCastingRecipe(gemcast, new FluidStack(moltenGoldFluid, TConstruct.ingotLiquidValue * 2), new ItemStack(Item.emerald), 80); //Ingots tableCasting.addCastingRecipe(new ItemStack(materials, 1, 2), new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue), ingotcast, 80); //stone + + //Gems + tableCasting.addCastingRecipe(new ItemStack(Item.emerald), new FluidStack(moltenEmeraldFluid, 640), gemcast, 80); //Buckets ItemStack bucket = new ItemStack(Item.bucketEmpty); @@ -1638,7 +1673,7 @@ private void addRecipesForBasinCasting () basinCasting.addCastingRecipe(new ItemStack(clearGlass, 1, 0), new FluidStack(moltenGlassFluid, FluidContainerRegistry.BUCKET_VOLUME), null, true, 100); //glass basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 4), new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue), null, true, 100); //seared stone basinCasting.addCastingRecipe(new ItemStack(smeltery, 1, 5), new FluidStack(moltenStoneFluid, TConstruct.chunkLiquidValue), new ItemStack(Block.cobblestone), true, 100); - + basinCasting.addCastingRecipe(new ItemStack(Block.blockEmerald), new FluidStack(moltenEmeraldFluid, 640*9), null, true, 100); //emerald basinCasting.addCastingRecipe(new ItemStack(speedBlock, 1, 0), new FluidStack(moltenTinFluid, TConstruct.nuggetLiquidValue), new ItemStack(Block.gravel), true, 100); //brownstone basinCasting.addCastingRecipe(new ItemStack(Block.whiteStone), new FluidStack(moltenEnderFluid, TConstruct.chunkLiquidValue), new ItemStack(Block.obsidian), true, 100); //endstone basinCasting.addCastingRecipe(new ItemStack(metalBlock.blockID, 1, 10), new FluidStack(moltenEnderFluid, 1000), null, true, 100); //ender @@ -1669,7 +1704,7 @@ private void addRecipesForSmeltery () Smeltery.addAlloyMixing(new FluidStack(moltenManyullynFluid, TConstruct.ingotLiquidValue * PHConstruct.ingotsManyullynAlloy), new FluidStack(moltenCobaltFluid, TConstruct.ingotLiquidValue), new FluidStack(moltenArditeFluid, TConstruct.ingotLiquidValue)); //Manyullyn Smeltery.addAlloyMixing(new FluidStack(pigIronFluid, TConstruct.ingotLiquidValue * PHConstruct.ingotsPigironAlloy), new FluidStack(moltenIronFluid, TConstruct.ingotLiquidValue), - new FluidStack(bloodFluid, 400)); //Pigiron + new FluidStack(moltenEmeraldFluid, 640), new FluidStack(bloodFluid, 80)); //Pigiron // Stone parts for (int sc = 0; sc < patternOutputs.length; sc++) @@ -1710,6 +1745,7 @@ private void addRecipesForSmeltery () Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.doorIron), 0, TConstruct.ingotLiquidValue * 6); Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.cauldron), 0, TConstruct.ingotLiquidValue * 7); Smeltery.addMelting(FluidType.Iron, new ItemStack(Item.shears), 0, TConstruct.ingotLiquidValue * 2); + Smeltery.addMelting(FluidType.Emerald, new ItemStack(Item.emerald), -50, 800); //Blocks melt as themselves! //Ore @@ -1730,6 +1766,7 @@ private void addRecipesForSmeltery () Smeltery.addMelting(Block.thinGlass, 0, 625, new FluidStack(moltenGlassFluid, 250)); Smeltery.addMelting(Block.stone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18)); Smeltery.addMelting(Block.cobblestone, 0, 800, new FluidStack(moltenStoneFluid, TConstruct.ingotLiquidValue / 18)); + Smeltery.addMelting(Block.blockEmerald, 0, 800, new FluidStack(moltenEmeraldFluid, 640*9)); Smeltery.addMelting(clearGlass, 0, 500, new FluidStack(moltenGlassFluid, 1000)); Smeltery.addMelting(glassPane, 0, 350, new FluidStack(moltenGlassFluid, 250)); @@ -1976,6 +2013,8 @@ public void oreRegistry () ensureOreIsRegistered("crafterWood", new ItemStack(Block.workbench, 1)); + OreDictionary.registerOre("torchStone", new ItemStack(stoneTorch)); + String[] matNames = { "wood", "stone", "iron", "flint", "cactus", "bone", "obsidian", "netherrack", "slime", "paper", "cobalt", "ardite", "manyullyn", "copper", "bronze", "alumite", "steel", "blueslime" }; for (int i = 0; i < matNames.length; i++) @@ -2423,17 +2462,17 @@ public void addAchievements () { HashMap achievements = TAchievements.achievements; - achievements.put("tconstruct.beginner", new Achievement(2001, "tconstruct.beginner", 0, 0, manualBook, null).setIndependent().registerAchievement()); - achievements.put("tconstruct.pattern", new Achievement(2002, "tconstruct.pattern", 2, 1, blankPattern, achievements.get("tconstruct.beginner")).registerAchievement()); - achievements.put("tconstruct.tinkerer", new Achievement(2003, "tconstruct.tinkerer", 2, 2, new ItemStack(titleIcon, 1, 4096), achievements.get("tconstruct.pattern")).registerAchievement()); + achievements.put("tconstruct.beginner", new Achievement(2741, "tconstruct.beginner", 0, 0, manualBook, null).setIndependent().registerAchievement()); + achievements.put("tconstruct.pattern", new Achievement(2742, "tconstruct.pattern", 2, 1, blankPattern, achievements.get("tconstruct.beginner")).registerAchievement()); + achievements.put("tconstruct.tinkerer", new Achievement(2743, "tconstruct.tinkerer", 2, 2, new ItemStack(titleIcon, 1, 4096), achievements.get("tconstruct.pattern")).registerAchievement()); achievements.put("tconstruct.preparedFight", - new Achievement(2004, "tconstruct.preparedFight", 1, 3, new ItemStack(titleIcon, 1, 4097), achievements.get("tconstruct.tinkerer")).registerAchievement()); - achievements.put("tconstruct.proTinkerer", new Achievement(2005, "tconstruct.proTinkerer", 4, 4, new ItemStack(titleIcon, 1, 4098), achievements.get("tconstruct.tinkerer")).setSpecial() + new Achievement(2744, "tconstruct.preparedFight", 1, 3, new ItemStack(titleIcon, 1, 4097), achievements.get("tconstruct.tinkerer")).registerAchievement()); + achievements.put("tconstruct.proTinkerer", new Achievement(2745, "tconstruct.proTinkerer", 4, 4, new ItemStack(titleIcon, 1, 4098), achievements.get("tconstruct.tinkerer")).setSpecial() .registerAchievement()); - achievements.put("tconstruct.smelteryMaker", new Achievement(2006, "tconstruct.smelteryMaker", -2, -1, smeltery, achievements.get("tconstruct.beginner")).registerAchievement()); + achievements.put("tconstruct.smelteryMaker", new Achievement(2746, "tconstruct.smelteryMaker", -2, -1, smeltery, achievements.get("tconstruct.beginner")).registerAchievement()); achievements.put("tconstruct.enemySlayer", - new Achievement(2007, "tconstruct.enemySlayer", 0, 5, new ItemStack(titleIcon, 1, 4099), achievements.get("tconstruct.preparedFight")).registerAchievement()); - achievements.put("tconstruct.dualConvenience", new Achievement(2008, "tconstruct.dualConvenience", 0, 7, new ItemStack(titleIcon, 1, 4100), achievements.get("tconstruct.enemySlayer")) + new Achievement(2747, "tconstruct.enemySlayer", 0, 5, new ItemStack(titleIcon, 1, 4099), achievements.get("tconstruct.preparedFight")).registerAchievement()); + achievements.put("tconstruct.dualConvenience", new Achievement(2748, "tconstruct.dualConvenience", 0, 7, new ItemStack(titleIcon, 1, 4100), achievements.get("tconstruct.enemySlayer")) .setSpecial().registerAchievement()); } } diff --git a/src/main/java/tconstruct/items/ArmorPattern.java b/src/main/java/tconstruct/items/ArmorPattern.java index 9ccaa38523a..fd1d8866103 100644 --- a/src/main/java/tconstruct/items/ArmorPattern.java +++ b/src/main/java/tconstruct/items/ArmorPattern.java @@ -16,7 +16,7 @@ public class ArmorPattern extends CraftingItem implements ItemBlocklike private Icon baseIcon; - public ArmorPattern(int id, String partType, String patternType, String folder) + public ArmorPattern(int id, String patternType, String folder) { super(id, patternName, getPatternNames(patternType), folder); this.setHasSubtypes(true); @@ -50,10 +50,10 @@ public void registerIcons (IconRegister iconRegister) public void getSubItems (int id, CreativeTabs tab, List list) { - for (int i = 0; i < patternName.length; i++) + /*for (int i = 0; i < patternName.length; i++) { list.add(new ItemStack(id, 1, i)); - } + }*/ } } \ No newline at end of file diff --git a/src/main/java/tconstruct/items/MetalPattern.java b/src/main/java/tconstruct/items/MetalPattern.java index c65fcffff42..6d6a6a49c0b 100644 --- a/src/main/java/tconstruct/items/MetalPattern.java +++ b/src/main/java/tconstruct/items/MetalPattern.java @@ -8,9 +8,9 @@ public class MetalPattern extends Pattern { - public MetalPattern(int id, String partType, String patternType, String folder) + public MetalPattern(int id, String patternType, String folder) { - super(id, partType, patternType, folder); + super(id, patternName, getPatternNames(patternType), folder); } protected static String[] getPatternNames (String partType) @@ -19,11 +19,13 @@ protected static String[] getPatternNames (String partType) for (int i = 0; i < patternName.length; i++) if (!(patternName[i].equals(""))) names[i] = partType + patternName[i]; + else + names[i] = ""; return names; } private static final String[] patternName = new String[] { "ingot", "rod", "pickaxe", "shovel", "axe", "swordblade", "largeguard", "mediumguard", "crossbar", "binding", "frypan", "sign", - "knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead" }; + "knifeblade", "chisel", "largerod", "toughbinding", "largeplate", "broadaxe", "scythe", "excavator", "largeblade", "hammerhead", "fullguard", "", "", "arrowhead", "gem" }; public void getSubItems (int id, CreativeTabs tab, List list) { diff --git a/src/main/java/tconstruct/items/Pattern.java b/src/main/java/tconstruct/items/Pattern.java index 21bf795d20c..62bb2fc6c60 100644 --- a/src/main/java/tconstruct/items/Pattern.java +++ b/src/main/java/tconstruct/items/Pattern.java @@ -11,9 +11,14 @@ public class Pattern extends CraftingItem implements IPattern { - public Pattern(int id, String partType, String patternType, String folder) + public Pattern(int id, String patternType, String folder) { - super(id, patternName, getPatternNames(patternType), folder); + this(id, patternName, getPatternNames(patternType), folder); + } + + public Pattern(int id, String[] names, String[] patternTypes, String folder) + { + super(id, names, patternTypes, folder); this.setHasSubtypes(true); this.setMaxDamage(0); this.setContainerItem(this); diff --git a/src/main/java/tconstruct/items/TitleIcon.java b/src/main/java/tconstruct/items/TitleIcon.java index af8dcb971a9..95b12dfd1e4 100644 --- a/src/main/java/tconstruct/items/TitleIcon.java +++ b/src/main/java/tconstruct/items/TitleIcon.java @@ -18,6 +18,7 @@ import tconstruct.client.TProxyClient; import tconstruct.entity.BlueSlime; import tconstruct.library.tools.ToolCore; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -26,10 +27,10 @@ public class TitleIcon extends Item int[] primaryColor = { 0x66BBE8, 0x66BBE8 }; int[] secondaryColor = { 0x1567BF, 0xFFEC6E }; String[] mobNames = { "TConstruct.EdibleSlime", "TConstruct.KingSlime" }; - - String[] achievementIconNames = new String[] {"tinkerer", "preparedFight", "proTinkerer", "enemySlayer", "dualConvenience"}; + + String[] achievementIconNames = new String[] { "tinkerer", "preparedFight", "proTinkerer", "enemySlayer", "dualConvenience" }; Icon[] achievementIcons = new Icon[achievementIconNames.length]; - + public TitleIcon(int par1) { super(par1); @@ -42,8 +43,9 @@ public void registerIcons (IconRegister iconRegister) ToolCore.blankSprite = iconRegister.registerIcon("tinker:blanksprite"); TProxyClient.metalBall = iconRegister.registerIcon("tinker:metalball"); itemIcon = iconRegister.registerIcon("tinker:tparts"); - for(int i = 0; i < achievementIcons.length; i++){ - achievementIcons[i] = iconRegister.registerIcon("tinker:achievementIcons/" + (i < achievementIconNames.length ? achievementIconNames[i] : "")); + for (int i = 0; i < achievementIcons.length; i++) + { + achievementIcons[i] = iconRegister.registerIcon("tinker:achievementIcons/" + (i < achievementIconNames.length ? achievementIconNames[i] : "")); } } @@ -58,23 +60,26 @@ public Icon getIconFromDamageForRenderPass (int par1, int par2) { if (par1 == 255) return itemIcon; - if (par1 >= 4096){ - return getIconFromDamage(par1); + if (par1 >= 4096) + { + return getIconFromDamage(par1); } return Item.monsterPlacer.getIconFromDamageForRenderPass(par1, par2); } - + @SideOnly(Side.CLIENT) public Icon getIconFromDamage (int par1) { - if(par1 >= 4096){ - int index = par1 - 4096; - if(index < achievementIcons.length){ - return achievementIcons[index]; - } - } - //Not returning null to prevent crashes - return itemIcon; + if (par1 >= 4096) + { + int index = par1 - 4096; + if (index < achievementIcons.length) + { + return achievementIcons[index]; + } + } + //Not returning null to prevent crashes + return itemIcon; } @Override @@ -105,7 +110,7 @@ public int getColorFromItemStack (ItemStack stack, int pass) if (damage == 255) return 0xffffff; if (damage >= 4096) - return 0xffffff; + return 0xffffff; return pass == 0 ? primaryColor[damage] : secondaryColor[damage]; } @@ -186,7 +191,8 @@ public static void spawnEntity (double x, double y, double z, Entity entity, Wor if (!world.isRemote) { entity.setPosition(x, y, z); - entity.setAngles(player.cameraYaw, player.cameraYaw); + if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) + entity.setAngles(player.cameraYaw, player.cameraYaw); ((EntityLiving) entity).onSpawnWithEgg((EntityLivingData) null); world.spawnEntityInWorld(entity); } diff --git a/src/main/java/tconstruct/library/client/FluidRenderProperties.java b/src/main/java/tconstruct/library/client/FluidRenderProperties.java index 58df82e0610..5794e70e2ce 100644 --- a/src/main/java/tconstruct/library/client/FluidRenderProperties.java +++ b/src/main/java/tconstruct/library/client/FluidRenderProperties.java @@ -46,7 +46,7 @@ public FluidRenderProperties(Applications defaults) public static enum Applications { - TABLE(0.9375F, 1F, 0.0625F, 0.9375F, 0.0625F, 0.9375F), BASIN(0.25F, 0.95F, 0.0625F, 0.9375F, 0.0625F, 0.9375F); + TABLE(0.9375F, 1F, 0.0625F, 0.9375F, 0.062F, 0.9375F), BASIN(0.25F, 0.95F, 0.0625F, 0.9375F, 0.0625F, 0.9375F); public float minHeight, maxHeight, minX, maxX, minZ, maxZ; diff --git a/src/main/java/tconstruct/util/EnvironmentChecks.java b/src/main/java/tconstruct/util/EnvironmentChecks.java index 0dff15370cd..c401dcc052f 100644 --- a/src/main/java/tconstruct/util/EnvironmentChecks.java +++ b/src/main/java/tconstruct/util/EnvironmentChecks.java @@ -19,6 +19,7 @@ private EnvironmentChecks() /** * Checks for conflicting stuff in environment; adds callable to any crash logs if so. + * Note: This code adds additional data to crashlogs. It does not trigger any crashes. */ public static void verifyEnvironmentSanity () { @@ -31,6 +32,8 @@ public static void verifyEnvironmentSanity () TConstruct.logger.severe("[Environment Checks] For this reason, the TCon dev team urge you to seek your tedium fix from someone else, as Greg disobeys"); TConstruct.logger.severe("[Environment Checks] the basic tenets of good modders conduct. We log this message rather than sabotage. We'd hope he'd do the same."); TConstruct.logger.severe("[Environment Checks] In the meantime, we recommend not playing anything but IC2 alongside Gregtech. ~ Sunstrike"); + TConstruct.logger.severe("[Environment Checks] GT Appendum I: And now he's going after Forge Mod Loader too..."); + TConstruct.logger.severe("[Environment Checks] http://forum.industrial-craft.net/index.php?page=Thread&postID=138551#post138551 ~ SlimeKnights"); modIds.add("gregtech_addon"); } @@ -40,12 +43,6 @@ public static void verifyEnvironmentSanity () modIds.add("optifine"); } - if (Loader.isModLoaded("DragonAPI")) - { - TConstruct.logger.severe("[Environment Checks] DragonAPI detected. Currently this just logs a warning, however if Reika continues his plan to implement DRM-like"); - TConstruct.logger.severe("[Environment Checks] code in his mod then it may become marked as fully unsupported. This is just a warning at this stage."); - } - try { Class cl = Class.forName("org.bukkit.Bukkit"); diff --git a/src/main/java/tconstruct/util/config/PHConstruct.java b/src/main/java/tconstruct/util/config/PHConstruct.java index 4346229ecac..1b67818fa7c 100644 --- a/src/main/java/tconstruct/util/config/PHConstruct.java +++ b/src/main/java/tconstruct/util/config/PHConstruct.java @@ -162,7 +162,7 @@ public static void initProps (File location) woodCrafterSlab = config.getBlock("Crafting Slab", 3243).getInt(3243); woolSlab1 = config.getBlock("Wool Slab 1", 3244).getInt(3244); woolSlab2 = config.getBlock("Wool Slab 2", 3245).getInt(3245); - //3246 + glueBlock = config.getBlock("Glue Block", 3256).getInt(3256); castingChannel = config.getBlock("Casting Channel", 3249).getInt(3249); slimePoolBlue = config.getBlock("Liquid Blue Slime", 3235).getInt(3235); @@ -374,6 +374,7 @@ public static void initProps (File location) //Experimental functionality throwableSmeltery = config.get("Experimental", "Items can be thrown into smelteries", true).getBoolean(true); newSmeltery = config.get("Experimental", "Use new adaptive Smeltery code", false, "Warning: Very buggy").getBoolean(false); + meltableHorses = config.get("Experimental", "Allow horses to be melted down for glue", true).getBoolean(true); //Addon stuff isCleaverTwoHanded = config.get("Battlegear", "Can Cleavers have shields", true).getBoolean(true); @@ -496,6 +497,7 @@ public static void initProps (File location) public static int meatBlock; public static int woolSlab1; public static int woolSlab2; + public static int glueBlock; //Patterns and misc public static int blankPattern; @@ -724,6 +726,7 @@ public static void initProps (File location) //Experimental functionality public static boolean throwableSmeltery; public static boolean newSmeltery; + public static boolean meltableHorses; //Addon stuff public static boolean isCleaverTwoHanded;