From 5f73c2152e1481e4ab70f9bda8aeb6d3206c97f0 Mon Sep 17 00:00:00 2001 From: mDiyo Date: Sun, 2 Jun 2013 06:46:42 -0700 Subject: [PATCH] Begin skill creation --- mods/tinker/resources/lang/en_US.xml | 1 + mods/tinker/tconstruct/TConstruct.java | 12 +- .../tconstruct/blocks/OreberryBush.java | 2 +- .../blocks/logic/SmelteryLogic.java | 6 +- .../tconstruct/client/TClientEvents.java | 64 +- mods/tinker/tconstruct/client/TControls.java | 130 +- .../tconstruct/client/TProxyClient.java | 7 +- .../tconstruct/client/gui/InventoryTab.java | 2 +- mods/tinker/tconstruct/common/TContent.java | 5 +- .../tconstruct/items/HeartCanister.java | 2 +- mods/tinker/tconstruct/items/TitleIcon.java | 5 - mods/tinker/tconstruct/items/armor/Glove.java | 20 + .../tconstruct/library/SkillRegistry.java | 24 + .../library/tools/AbilityHelper.java | 27 + .../tconstruct/modifiers/TActiveOmniMod.java | 31 +- .../MineFactoryReloaded.java | 17 +- mods/tinker/tconstruct/skill/Jump.java | 35 + mods/tinker/tconstruct/skill/Skill.java | 57 + mods/tinker/tconstruct/skill/SkillBase.java | 34 - .../tinker/tconstruct/skill/WallBuilding.java | 135 ++ mods/tinker/tconstruct/util/PHConstruct.java | 2 + .../tinker/tconstruct/util/TEventHandler.java | 1328 +++++++++-------- .../util/network/TPacketHandler.java | 37 +- .../tconstruct/util/player/ArmorExtended.java | 48 +- .../util/player/ArmorExtendedClient.java | 35 + .../util/player/TPlayerHandler.java | 43 +- .../tconstruct/util/player/TPlayerStats.java | 6 +- mods/tinker/textures/items/armor/dirthand.png | Bin 0 -> 338 bytes mods/tinker/textures/skill/Float48x.png | Bin 0 -> 2273 bytes mods/tinker/textures/skill/Jump48x.png | Bin 0 -> 2305 bytes mods/tinker/textures/skill/Wall16x.png | Bin 0 -> 708 bytes mods/tinker/textures/skill/Wall32x.png | Bin 0 -> 1470 bytes mods/tinker/textures/skill/Wall48x.png | Bin 0 -> 1944 bytes 33 files changed, 1324 insertions(+), 791 deletions(-) create mode 100644 mods/tinker/tconstruct/items/armor/Glove.java create mode 100644 mods/tinker/tconstruct/library/SkillRegistry.java create mode 100644 mods/tinker/tconstruct/skill/Jump.java create mode 100644 mods/tinker/tconstruct/skill/Skill.java delete mode 100644 mods/tinker/tconstruct/skill/SkillBase.java create mode 100644 mods/tinker/tconstruct/skill/WallBuilding.java create mode 100644 mods/tinker/tconstruct/util/player/ArmorExtendedClient.java create mode 100644 mods/tinker/textures/items/armor/dirthand.png create mode 100644 mods/tinker/textures/skill/Float48x.png create mode 100644 mods/tinker/textures/skill/Jump48x.png create mode 100644 mods/tinker/textures/skill/Wall16x.png create mode 100644 mods/tinker/textures/skill/Wall32x.png create mode 100644 mods/tinker/textures/skill/Wall48x.png diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml index 8f3f795d..57e0bea8 100644 --- a/mods/tinker/resources/lang/en_US.xml +++ b/mods/tinker/resources/lang/en_US.xml @@ -172,6 +172,7 @@ Empty Canister Miniature Red Heart Heart Canister + Dirtmover Gloves Casting Table Seared Faucet diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java index a34c1f7a..433810e2 100644 --- a/mods/tinker/tconstruct/TConstruct.java +++ b/mods/tinker/tconstruct/TConstruct.java @@ -2,20 +2,21 @@ package mods.tinker.tconstruct; import mods.tinker.tconstruct.common.TContent; import mods.tinker.tconstruct.common.TProxyCommon; +import mods.tinker.tconstruct.library.SkillRegistry; import mods.tinker.tconstruct.library.TConstructRegistry; import mods.tinker.tconstruct.library.crafting.Detailing; import mods.tinker.tconstruct.library.crafting.LiquidCasting; import mods.tinker.tconstruct.library.util.TabTools; +import mods.tinker.tconstruct.skill.Jump; +import mods.tinker.tconstruct.skill.WallBuilding; import mods.tinker.tconstruct.util.PHConstruct; import mods.tinker.tconstruct.util.TCraftingHandler; import mods.tinker.tconstruct.util.TEventHandler; import mods.tinker.tconstruct.util.player.TPlayerHandler; -import mods.tinker.tconstruct.worldgen.OverworldProvider; import mods.tinker.tconstruct.worldgen.TBaseWorldGenerator; import mods.tinker.tconstruct.worldgen.village.TVillageTrades; import mods.tinker.tconstruct.worldgen.village.VillageSmelteryHandler; import mods.tinker.tconstruct.worldgen.village.VillageToolStationHandler; -import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; @@ -37,7 +38,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry; * @dependencies: IC2 API, MFR API */ -@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.dev49", dependencies = "required-after:Forge@[7.7.1.675,)") +@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.4", dependencies = "required-after:Forge@[7.7.1.675,)") @NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.util.network.TPacketHandler.class) public class TConstruct { @@ -106,6 +107,8 @@ public class TConstruct content.modIntegration(); content.createEntities(); + SkillRegistry.registerSkill("Wall Building", new WallBuilding()); + SkillRegistry.registerSkill("Jump", new Jump()); } public static LiquidCasting getTableCasting() @@ -122,11 +125,12 @@ public class TConstruct { return chiselDetailing; } - + public static TEventHandler events; public static TPlayerHandler playerTracker; public static TContent content; public static LiquidCasting tableCasting; public static LiquidCasting basinCasting; public static Detailing chiselDetailing; + public static SkillRegistry skillRegistry; } diff --git a/mods/tinker/tconstruct/blocks/OreberryBush.java b/mods/tinker/tconstruct/blocks/OreberryBush.java index 41660c01..5a6f1e6a 100644 --- a/mods/tinker/tconstruct/blocks/OreberryBush.java +++ b/mods/tinker/tconstruct/blocks/OreberryBush.java @@ -116,7 +116,7 @@ public class OreberryBush extends BlockLeavesBase implements IPlantable } else { - return AxisAlignedBB.getBoundingBox(x, y, z, (double) x + 1.0D, (double) y + 1.0D, (double) z + 1.0D); + return AxisAlignedBB.getBoundingBox(x+0.0625, y, z+0.0625, (double) x + 0.9375D, (double) y + 0.9375D, (double) z + 0.9375D); } } diff --git a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java index 544d724f..5b03980a 100644 --- a/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java +++ b/mods/tinker/tconstruct/blocks/logic/SmelteryLogic.java @@ -612,7 +612,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci { for (int zPos = z - 1; zPos <= z + 1; zPos++) { - if (worldObj.getBlockId(xPos, y, zPos) != 0) + Block block = Block.blocksList[worldObj.getBlockId(xPos, y, zPos)]; + if (block != null && block.isAirBlock(worldObj, xPos, y, zPos)) return count; } } @@ -646,7 +647,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci for (int zPos = z - 1; zPos <= z + 1; zPos++) { int blockID = worldObj.getBlockId(xPos, y, zPos); - if (blockID != 0) + Block block = Block.blocksList[blockID]; + if (block != null && !block.isAirBlock(worldObj, xPos, y, zPos)) { if (blockID == TContent.smeltery.blockID) return validateBottom(x, y, z, count); diff --git a/mods/tinker/tconstruct/client/TClientEvents.java b/mods/tinker/tconstruct/client/TClientEvents.java index 990b5c96..a8aa383a 100644 --- a/mods/tinker/tconstruct/client/TClientEvents.java +++ b/mods/tinker/tconstruct/client/TClientEvents.java @@ -1,8 +1,12 @@ package mods.tinker.tconstruct.client; +import java.util.List; + import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.client.armor.WingModel; import mods.tinker.tconstruct.common.TContent; +import mods.tinker.tconstruct.skill.Skill; +import mods.tinker.tconstruct.util.player.TPlayerStats; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.model.ModelBiped; @@ -13,7 +17,12 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.client.event.sound.SoundLoadEvent; import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; import net.minecraftforge.liquids.LiquidStack; + +import org.lwjgl.opengl.GL11; + import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -22,6 +31,22 @@ public class TClientEvents { Minecraft mc = Minecraft.getMinecraft(); EntityPlayer player; + + /*@ForgeSubscribe + public void interact (PlayerInteractEvent event) + { + if (event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer.worldObj.isRemote) + { + System.out.println("Fired"); + List skills = TProxyClient.skillList; + if (skills.size() > 0) + { + Skill walls = TConstruct.playerTracker.getPlayerStats(event.entityPlayer.username).skillList.get(0); + walls.rightClickActivate(event.entityPlayer, event.entityPlayer.worldObj); + } + } + }*/ + /* Sounds */ @ForgeSubscribe public void onSound (SoundLoadEvent event) @@ -51,20 +76,22 @@ public class TClientEvents } } - /* Health */ + /* HUD */ @ForgeSubscribe public void renderHealthbar (RenderGameOverlayEvent.Post event) { + if (player == null) + player = mc.thePlayer; + + 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(player.username); + if (event.type == RenderGameOverlayEvent.ElementType.HEALTH) - { - if (player == null) - player = mc.thePlayer; - - 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; + { this.mc.renderEngine.bindTexture("/mods/tinker/textures/gui/newhearts.png"); int hp = player.getHealth(); @@ -85,9 +112,22 @@ public class TClientEvents this.mc.renderEngine.bindTexture("/gui/icons.png"); } + + if (event.type == RenderGameOverlayEvent.ElementType.HOTBAR) + { + int amount = 0; + GL11.glScalef(1/16f, 1/16f, 1/16f); + for (Skill skill : stats.skillList) + { + if (!skill.getActive()) + GL11.glColor4f(0.5f, 0.5f, 0.5f, 1.0F); + this.mc.renderEngine.bindTexture(skill.getTextureFile(scaledresolution.getScaleFactor())); + this.drawTexturedModalRect((2+amount*18)*16, 32, 0, 0, 256, 256); + amount++; + } + GL11.glScalef(16f, 16f, 16f); + } } - - public void drawTexturedModalRect(int par1, int par2, int par3, int par4, int par5, int par6) { diff --git a/mods/tinker/tconstruct/client/TControls.java b/mods/tinker/tconstruct/client/TControls.java index a99d485f..60922b27 100644 --- a/mods/tinker/tconstruct/client/TControls.java +++ b/mods/tinker/tconstruct/client/TControls.java @@ -4,13 +4,13 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.util.EnumSet; -import mods.tinker.tconstruct.client.gui.InventoryTab; -import net.minecraft.block.Block; +import mods.tinker.tconstruct.TConstruct; +import mods.tinker.tconstruct.skill.Skill; +import mods.tinker.tconstruct.util.player.TPlayerStats; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.settings.KeyBinding; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.packet.Packet250CustomPayload; import cpw.mods.fml.common.TickType; import cpw.mods.fml.common.network.PacketDispatcher; @@ -19,22 +19,29 @@ public class TControls extends TKeyHandler { //static KeyBinding grabKey = new KeyBinding("key.grab", 29); //static KeyBinding stiltsKey = new KeyBinding("key.stilts", 46); - public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24); + public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24); + public static KeyBinding skillOne = new KeyBinding("key.skill.one", 44); + public static KeyBinding skillTwo = new KeyBinding("key.skill.two", 45); + public static KeyBinding skillThree = new KeyBinding("key.skill.three", 46); + public static KeyBinding skillFour = new KeyBinding("key.skill.four", 47); + public static KeyBinding skillFive = new KeyBinding("key.skill.five", 48); static KeyBinding jumpKey; static KeyBinding invKey; static Minecraft mc; + boolean jumping; boolean doubleJump = true; boolean climbing = false; boolean onGround = false; boolean onStilts = false; - + //boolean onStilts = false; public TControls() { - super(new KeyBinding[] { armorKey }, new boolean[] { false }, getVanillaKeyBindings(), new boolean[] { false, false }); - //System.out.println("Controls registered"); + super(new KeyBinding[] { armorKey, skillOne, skillTwo, skillThree, skillFour, skillFive }, new boolean[] { false, false, false, false, false, false }, getVanillaKeyBindings(), new boolean[] { + false, false }); + //System.out.println("Controls registered");Natura } private static KeyBinding[] getVanillaKeyBindings () @@ -56,15 +63,34 @@ public class TControls extends TKeyHandler { if (tickEnd && mc.theWorld != null) { - if (kb == armorKey && mc.currentScreen == null) //Extended Armor - { - openArmorGui(mc.thePlayer.username); - } - if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode()) - { - TProxyClient.addTabsToInventory(); - - } + if (kb == armorKey && mc.currentScreen == null) //Extended Armor + { + openArmorGui();//mc.thePlayer.username); + } + if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// && !mc.playerController.isInCreativeMode()) + { + TProxyClient.addTabsToInventory(); + } + if (kb == skillOne) + { + sendSkillkey(mc.thePlayer, (byte) 0);//, mc.thePlayer.dimension, mc.thePlayer.entityId); + } + if (kb == skillTwo) + { + sendSkillkey(mc.thePlayer, (byte) 1);//, mc.thePlayer.dimension, mc.thePlayer.entityId); + } + if (kb == skillThree) + { + sendSkillkey(mc.thePlayer, (byte) 2);//, mc.thePlayer.dimension, mc.thePlayer.entityId); + } + if (kb == skillFour) + { + sendSkillkey(mc.thePlayer, (byte) 3);//, mc.thePlayer.dimension, mc.thePlayer.entityId); + } + if (kb == skillFive) + { + sendSkillkey(mc.thePlayer, (byte) 4);//, mc.thePlayer.dimension, mc.thePlayer.entityId); + } /*if (kb == jumpKey) //Double jump { if (jumping && !doubleJump) @@ -124,8 +150,8 @@ public class TControls extends TKeyHandler doubleJump = false; jumping = false; } - - public void resetControls() + + public void resetControls () { doubleJump = false; jumping = false; @@ -150,7 +176,7 @@ public class TControls extends TKeyHandler updateServer(bos); } - + void updateSize (String name, float size) { ByteArrayOutputStream bos = new ByteArrayOutputStream(8); @@ -168,25 +194,57 @@ public class TControls extends TKeyHandler updateServer(bos); } - - public static void openArmorGui(String username) - { - ByteArrayOutputStream bos = new ByteArrayOutputStream(8); - DataOutputStream outputStream = new DataOutputStream(bos); - try - { - outputStream.writeByte(3); - outputStream.writeUTF(username); - } - catch (Exception ex) - { - ex.printStackTrace(); - } - updateServer(bos); + public static void openArmorGui ()//String username) + { + ByteArrayOutputStream bos = new ByteArrayOutputStream(8); + DataOutputStream outputStream = new DataOutputStream(bos); + try + { + outputStream.writeByte(3); + //outputStream.writeUTF(username); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + updateServer(bos); } - static void updateServer(ByteArrayOutputStream bos) + /*public void activateSkill (EntityPlayer player, int slot) + { + if (TProxyClient.skillList.size() > slot) + { + Skill skill = TProxyClient.skillList.get(slot); + if (skill != null) + { + skill.activate(player, player.worldObj); + } + } + }*/ + + public void sendSkillkey (EntityPlayer player, byte key)//, int dim, int id) + { + TConstruct.playerTracker.activateSkill(player, key); + ByteArrayOutputStream bos = new ByteArrayOutputStream(8); + DataOutputStream outputStream = new DataOutputStream(bos); + try + { + outputStream.writeByte(4); + //outputStream.writeInt(dim); + //outputStream.writeInt(id); + outputStream.writeByte(key); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + + updateServer(bos); + } + + static void updateServer (ByteArrayOutputStream bos) { Packet250CustomPayload packet = new Packet250CustomPayload(); packet.channel = "TConstruct"; diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java index fddc50c2..865d7e1b 100644 --- a/mods/tinker/tconstruct/client/TProxyClient.java +++ b/mods/tinker/tconstruct/client/TProxyClient.java @@ -9,7 +9,6 @@ import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; -import mods.natura.entity.NitroCreeper; import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.blocks.logic.CastingBasinLogic; import mods.tinker.tconstruct.blocks.logic.CastingTableLogic; @@ -67,7 +66,9 @@ import mods.tinker.tconstruct.library.client.TConstructClientRegistry; import mods.tinker.tconstruct.library.client.ToolGuiElement; import mods.tinker.tconstruct.library.crafting.ToolBuilder; import mods.tinker.tconstruct.library.tools.ToolCore; +import mods.tinker.tconstruct.skill.Skill; import mods.tinker.tconstruct.util.player.ArmorExtended; +import mods.tinker.tconstruct.util.player.ArmorExtendedClient; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; @@ -99,7 +100,6 @@ import net.minecraft.client.particle.EntitySplashFX; import net.minecraft.client.particle.EntitySuspendFX; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.entity.RenderCreeper; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.KeyBinding; @@ -125,8 +125,9 @@ public class TProxyClient extends TProxyCommon public static SmallFontRenderer smallFontRenderer; public static Icon metalBall; public static Minecraft mc; - public static ArmorExtended armorExtended = new ArmorExtended(); public static RenderItem itemRenderer = new RenderItem(); + + public static ArmorExtended armorExtended = new ArmorExtended(); @Override public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z) diff --git a/mods/tinker/tconstruct/client/gui/InventoryTab.java b/mods/tinker/tconstruct/client/gui/InventoryTab.java index f79d4144..151c3efc 100644 --- a/mods/tinker/tconstruct/client/gui/InventoryTab.java +++ b/mods/tinker/tconstruct/client/gui/InventoryTab.java @@ -65,7 +65,7 @@ public class InventoryTab extends GuiButton if (this.id == 2) TProxyClient.openInventoryGui(); if (this.id == 3) - TControls.openArmorGui(mc.thePlayer.username); + TControls.openArmorGui();//mc.thePlayer.username); } return inWindow; } diff --git a/mods/tinker/tconstruct/common/TContent.java b/mods/tinker/tconstruct/common/TContent.java index f3fc52fc..96102f33 100644 --- a/mods/tinker/tconstruct/common/TContent.java +++ b/mods/tinker/tconstruct/common/TContent.java @@ -47,6 +47,7 @@ import mods.tinker.tconstruct.items.StrangeFood; import mods.tinker.tconstruct.items.TitleIcon; import mods.tinker.tconstruct.items.ToolPart; import mods.tinker.tconstruct.items.ToolShard; +import mods.tinker.tconstruct.items.armor.Glove; import mods.tinker.tconstruct.items.armor.TArmorBase; import mods.tinker.tconstruct.items.blocks.CraftedSoilItemBlock; import mods.tinker.tconstruct.items.blocks.GravelOreItem; @@ -233,11 +234,12 @@ public class TContent implements IFuelHandler public static Item notebook; public static Item note; - //Wearaables + //Wearables public static Item heavyHelmet; public static Item heavyChestplate; public static Item heavyPants; public static Item heavyBoots; + public static Item glove; public static Item heartCanister; @@ -484,6 +486,7 @@ public class TContent implements IFuelHandler //heavyHelmet = new TArmorBase(PHConstruct.heavyHelmet, 0).setUnlocalizedName("tconstruct.HeavyHelmet"); heartCanister = new HeartCanister(PHConstruct.heartCanister).setUnlocalizedName("tconstruct.canister"); heavyBoots = new TArmorBase(PHConstruct.heavyBoots, 3).setUnlocalizedName("tconstruct.HeavyBoots"); + glove = new Glove(PHConstruct.glove).setUnlocalizedName("tconstruct.Glove"); /*public static Item heavyHelmet; public static Item heavyChestplate; public static Item heavyPants; diff --git a/mods/tinker/tconstruct/items/HeartCanister.java b/mods/tinker/tconstruct/items/HeartCanister.java index 005a6b53..09197122 100644 --- a/mods/tinker/tconstruct/items/HeartCanister.java +++ b/mods/tinker/tconstruct/items/HeartCanister.java @@ -40,7 +40,7 @@ public class HeartCanister extends CraftingItem slotStack.stackSize++; stack.stackSize--; } - armor.recalculateHealth(); + armor.recalculateHealth(player, stats); } } return stack; diff --git a/mods/tinker/tconstruct/items/TitleIcon.java b/mods/tinker/tconstruct/items/TitleIcon.java index 2207c033..2cb16280 100644 --- a/mods/tinker/tconstruct/items/TitleIcon.java +++ b/mods/tinker/tconstruct/items/TitleIcon.java @@ -2,7 +2,6 @@ package mods.tinker.tconstruct.items; import java.util.List; -import mods.natura.entity.NitroCreeper; import mods.tinker.tconstruct.client.TProxyClient; import mods.tinker.tconstruct.entity.BlueSlime; import mods.tinker.tconstruct.library.tools.ToolCore; @@ -10,7 +9,6 @@ import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; @@ -106,9 +104,6 @@ public class TitleIcon extends Item case 1: spawnBossSlime(posX, posY, posZ, new BlueSlime(world), world, player); break; - case 2: - spawnEntity(posX, posY, posZ, new NitroCreeper(world), world, player); - break; } if (!player.capabilities.isCreativeMode) { diff --git a/mods/tinker/tconstruct/items/armor/Glove.java b/mods/tinker/tconstruct/items/armor/Glove.java new file mode 100644 index 00000000..324fc096 --- /dev/null +++ b/mods/tinker/tconstruct/items/armor/Glove.java @@ -0,0 +1,20 @@ +package mods.tinker.tconstruct.items.armor; + +import mods.tinker.tconstruct.library.TConstructRegistry; +import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.item.Item; + +public class Glove extends Item +{ + public Glove(int par1) + { + super(par1); + this.setCreativeTab(TConstructRegistry.materialTab); + } + + @Override + public void registerIcons (IconRegister iconRegister) + { + itemIcon = iconRegister.registerIcon("tinker:armor/dirthand"); + } +} diff --git a/mods/tinker/tconstruct/library/SkillRegistry.java b/mods/tinker/tconstruct/library/SkillRegistry.java new file mode 100644 index 00000000..064164a3 --- /dev/null +++ b/mods/tinker/tconstruct/library/SkillRegistry.java @@ -0,0 +1,24 @@ +package mods.tinker.tconstruct.library; + +import java.util.HashMap; + +import mods.tinker.tconstruct.skill.Skill; + +public class SkillRegistry +{ + public static HashMap skills = new HashMap(); + + static int skillID = 0; + public static HashMap skillMapping = new HashMap(); //Simplifies network transmission + + public static void registerSkill(String name, Skill skill) + { + skills.put(name, skill); + skillMapping.put(getNextID(), name); + } + + static Integer getNextID () + { + return skillID++; + } +} diff --git a/mods/tinker/tconstruct/library/tools/AbilityHelper.java b/mods/tinker/tconstruct/library/tools/AbilityHelper.java index 6ffadaee..ca1abd50 100644 --- a/mods/tinker/tconstruct/library/tools/AbilityHelper.java +++ b/mods/tinker/tconstruct/library/tools/AbilityHelper.java @@ -20,6 +20,7 @@ import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.passive.EntityWolf; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.potion.Potion; @@ -28,6 +29,8 @@ import net.minecraft.stats.StatList; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.util.Vec3; import net.minecraft.world.World; import net.minecraftforge.common.FakePlayer; import net.minecraftforge.common.MinecraftForge; @@ -610,4 +613,28 @@ public class AbilityHelper world.spawnEntityInWorld(entityitem); return entityitem; } + + public static MovingObjectPosition raytraceFromEntity (World world, Entity player, boolean par3, double range) + { + float f = 1.0F; + float f1 = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * f; + float f2 = player.prevRotationYaw + (player.rotationYaw - player.prevRotationYaw) * f; + double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f; + double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset; + double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f; + Vec3 vec3 = world.getWorldVec3Pool().getVecFromPool(d0, d1, d2); + float f3 = MathHelper.cos(-f2 * 0.017453292F - (float) Math.PI); + float f4 = MathHelper.sin(-f2 * 0.017453292F - (float) Math.PI); + float f5 = -MathHelper.cos(-f1 * 0.017453292F); + float f6 = MathHelper.sin(-f1 * 0.017453292F); + float f7 = f4 * f5; + float f8 = f3 * f5; + double d3 = range; + if (player instanceof EntityPlayerMP) + { + d3 = ((EntityPlayerMP) player).theItemInWorldManager.getBlockReachDistance(); + } + Vec3 vec31 = vec3.addVector((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); + return world.rayTraceBlocks_do_do(vec3, vec31, par3, !par3); + } } diff --git a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java index ecd52859..c4a5a249 100644 --- a/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java +++ b/mods/tinker/tconstruct/modifiers/TActiveOmniMod.java @@ -14,11 +14,13 @@ import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class TActiveOmniMod extends ActiveToolMod @@ -50,7 +52,7 @@ public class TActiveOmniMod extends ActiveToolMod { if (player.capabilities.isCreativeMode) return false; - + if (tool instanceof HarvestTool) TContent.modL.midStreamModify(stack); @@ -89,6 +91,33 @@ public class TActiveOmniMod extends ActiveToolMod entityitem.delayBeforeCanPickup = 10; world.spawnEntityInWorld(entityitem); world.playAuxSFX(2001, x, y, z, bID + (meta << 12)); + + int i = spawnme.stackSize; + float f = FurnaceRecipes.smelting().getExperience(spawnme); + int j; + + if (f == 0.0F) + { + i = 0; + } + else if (f < 1.0F) + { + j = MathHelper.floor_float((float) i * f); + + if (j < MathHelper.ceiling_float_int((float) i * f) && (float) Math.random() < (float) i * f - (float) j) + { + ++j; + } + + i = j; + } + + while (i > 0) + { + j = EntityXPOrb.getXPSplit(i); + i -= j; + player.worldObj.spawnEntityInWorld(new EntityXPOrb(world, x, y + 0.5, z, j)); + } } for (int i = 0; i < 6; i++) { diff --git a/mods/tinker/tconstruct/plugins/minefactoryreloaded/MineFactoryReloaded.java b/mods/tinker/tconstruct/plugins/minefactoryreloaded/MineFactoryReloaded.java index fa1a9aaf..52dc1351 100644 --- a/mods/tinker/tconstruct/plugins/minefactoryreloaded/MineFactoryReloaded.java +++ b/mods/tinker/tconstruct/plugins/minefactoryreloaded/MineFactoryReloaded.java @@ -1,16 +1,11 @@ package mods.tinker.tconstruct.plugins.minefactoryreloaded; -import mods.natura.entity.NitroCreeper; import mods.tinker.tconstruct.common.TContent; import mods.tinker.tconstruct.entity.BlueSlime; -import mods.tinker.tconstruct.entity.Crystal; -import mods.tinker.tconstruct.entity.MetalSlime; -import mods.tinker.tconstruct.entity.Skyla; import mods.tinker.tconstruct.plugins.minefactoryreloaded.grindables.GrindableStandard; import mods.tinker.tconstruct.plugins.minefactoryreloaded.harvestables.HarvestableOreBerry; - -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import powercrystals.minefactoryreloaded.api.FarmingRegistry; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; @@ -18,8 +13,6 @@ import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; -import powercrystals.minefactoryreloaded.api.FarmingRegistry; - @Mod(modid = "TConstruct|CompatMineFactoryReloaded", name = "TConstruct Compat: MFR", version = "0.1", dependencies = "after:MineFactoryReloaded;after:TConstruct") @NetworkMod(clientSideRequired = false, serverSideRequired = false) @@ -42,10 +35,10 @@ public class MineFactoryReloaded // A note: in 1.6, this method of registering grindables will no longer exist, once MFR moves to a more universal way of gathering drops. FarmingRegistry.registerGrindable(new GrindableStandard(BlueSlime.class, new ItemStack(TContent.strangeFood))); - FarmingRegistry.registerGrindable(new GrindableStandard(Crystal.class, new ItemStack(Item.gunpowder))); - FarmingRegistry.registerGrindable(new GrindableStandard(MetalSlime.class, new ItemStack(TContent.strangeFood))); - FarmingRegistry.registerGrindable(new GrindableStandard(NitroCreeper.class, new ItemStack(Item.gunpowder))); - FarmingRegistry.registerGrindable(new GrindableStandard(Skyla.class, new ItemStack(Item.gunpowder))); + //FarmingRegistry.registerGrindable(new GrindableStandard(Crystal.class, new ItemStack(Item.gunpowder))); + //FarmingRegistry.registerGrindable(new GrindableStandard(MetalSlime.class, new ItemStack(TContent.strangeFood))); + //FarmingRegistry.registerGrindable(new GrindableStandard(NitroCreeper.class, new ItemStack(Item.gunpowder))); + //FarmingRegistry.registerGrindable(new GrindableStandard(Skyla.class, new ItemStack(Item.gunpowder))); /* * Perhaps TC ores should be registered as drops from the MFR Laser Drill here, but I don't know which things would be suitable for that. diff --git a/mods/tinker/tconstruct/skill/Jump.java b/mods/tinker/tconstruct/skill/Jump.java new file mode 100644 index 00000000..de1efc9f --- /dev/null +++ b/mods/tinker/tconstruct/skill/Jump.java @@ -0,0 +1,35 @@ +package mods.tinker.tconstruct.skill; + +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.world.World; + +public class Jump extends Skill +{ + + @Override + public String getTextureFile (int guiscale) + { + /*if (guiscale == 2) + return "/mods/tinker/textures/skill/Jump32x.png"; + if (guiscale == 3) + return "/mods/tinker/textures/skill/Jump48x.png"; + + return "/mods/tinker/textures/skill/Jump16x.png";*/ + return "/mods/tinker/textures/skill/Jump48x.png"; + } + + @Override + public String getSkillName () + { + return "Jump"; + } + + @Override + public void activate (Entity entity, World world) + { + if (entity.onGround) + entity.motionY = 0.8f; + } + +} diff --git a/mods/tinker/tconstruct/skill/Skill.java b/mods/tinker/tconstruct/skill/Skill.java new file mode 100644 index 00000000..9efe11ef --- /dev/null +++ b/mods/tinker/tconstruct/skill/Skill.java @@ -0,0 +1,57 @@ +package mods.tinker.tconstruct.skill; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraft.world.World; + +/* Base skill + * + */ + +public abstract class Skill +{ + boolean active = true; + public abstract String getTextureFile(int guiscale); + public abstract String getSkillName(); + public abstract void activate(Entity entity, World world); + public void rightClickActivate(Entity entity, World world) {}; + + public int chargeTime() //Ticks + { + return 0; + } + + public boolean canEntityUseSkill(Entity entity) + { + return true; + } + + public int getSkillCost() + { + return 0; + } + + public boolean getActive() + { + return active; + } + + public Skill copy() throws InstantiationException, IllegalAccessException + { + return this.getClass().newInstance(); + } + + /* Save/Load */ + public void saveToNBT (NBTTagCompound tag) + { + + } + + public void readFromNBT (NBTTagCompound tag) + { + + } +} diff --git a/mods/tinker/tconstruct/skill/SkillBase.java b/mods/tinker/tconstruct/skill/SkillBase.java deleted file mode 100644 index f80949c5..00000000 --- a/mods/tinker/tconstruct/skill/SkillBase.java +++ /dev/null @@ -1,34 +0,0 @@ -package mods.tinker.tconstruct.skill; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; - -/* Base skill - * - */ - -public abstract class SkillBase -{ - public abstract String getTextureFile(); - public abstract String getSkillName(); - - public int chargeTime() //Ticks - { - return 0; - } - - public boolean canPlayerUseSkill() - { - return true; - } - - public void activateSkill(EntityPlayer player, World world) - { - - } - - public int getSkillCost() - { - return 0; - } -} diff --git a/mods/tinker/tconstruct/skill/WallBuilding.java b/mods/tinker/tconstruct/skill/WallBuilding.java new file mode 100644 index 00000000..46989045 --- /dev/null +++ b/mods/tinker/tconstruct/skill/WallBuilding.java @@ -0,0 +1,135 @@ +package mods.tinker.tconstruct.skill; + +import mods.tinker.tconstruct.library.tools.AbilityHelper; +import net.minecraft.block.Block; +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.MathHelper; +import net.minecraft.util.MovingObjectPosition; +import net.minecraft.world.World; +import net.minecraftforge.common.ForgeDirection; + +public class WallBuilding extends Skill +{ + + @Override + public String getTextureFile (int guiscale) + { + if (guiscale == 2) + return "/mods/tinker/textures/skill/Wall32x.png"; + if (guiscale == 3) + return "/mods/tinker/textures/skill/Wall48x.png"; + + return "/mods/tinker/textures/skill/Wall16x.png"; + } + + @Override + public String getSkillName () + { + return "Wall Building"; + } + + @Override + public void activate (Entity entity, World world) + { + if (!world.isRemote) + this.active = !active; + } + + @Override + public void rightClickActivate (Entity entity, World world) + { + if (!world.isRemote && active) + { + if (entity instanceof EntityPlayer) + { + EntityPlayer player = (EntityPlayer) entity; + ItemStack stack = player.getCurrentEquippedItem(); + if (stack != null && stack.getItem() instanceof ItemBlock) + { + MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(world, entity, true, 6); + + if (mop != null) + { + int xPos = mop.blockX; + int yPos = mop.blockY; + int zPos = mop.blockZ; + /*ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit); + switch (sideHit) + { + case UP: + yPos += 1; + break; + case DOWN: + yPos -= 1; + break; + case NORTH: + zPos -= 1; + break; + case SOUTH: + zPos += 1; + break; + case EAST: + xPos += 1; + break; + case WEST: + xPos -= 1; + break; + default: + break; + }*/ + + int facing = MathHelper.floor_double((double) (entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; + int xMin = 0; + int xMax = 0; + int zMin = 0; + int zMax = 0; + if (facing % 2 == 0) + { + xMin = -1; + xMax = 1; + } + else + { + zMin = -1; + zMax = 1; + } + + for (int y = -1; y <= 1; y++) + { + for (int x = xMin; x <= xMax; x++) + { + for (int z = zMin; z <= zMax; z++) + { + stack.getItem().onItemUse(stack, player, world, xPos + x, yPos + y, zPos + z, mop.sideHit, 0, 0, 0); + if (stack.stackSize < 1) + { + player.inventory.setInventorySlotContents(player.inventory.currentItem, null); + break; + } + //world.setBlock(xPos + x, yPos + y, zPos + z, Block.whiteStone.blockID); + } + } + } + //entity.worldObj.setBlock(xPos, yPos, zPos, Block.stone.blockID, 0, 3); + world.playAuxSFX(2001, xPos, yPos, zPos, Block.stone.blockID + (0 << 12)); + } + } + } + /*for (int x = -2; x <= 2; x++) + { + for (int y = -1; y <= 1; y++) + { + //for (int z = -2; z <= 2; z++) + { + world.setBlock((int) Math.floor(entity.posX) + x, (int) Math.floor(entity.posY) + y, (int) Math.floor(entity.posZ) + 2, Block.whiteStone.blockID); + } + } + } + world.playAuxSFX(2001, (int) entity.posX, (int) entity.posY, (int) entity.posZ, Block.stone.blockID + (0 << 12));*/ + } + } + +} diff --git a/mods/tinker/tconstruct/util/PHConstruct.java b/mods/tinker/tconstruct/util/PHConstruct.java index 52d0fbb1..de9a7a96 100644 --- a/mods/tinker/tconstruct/util/PHConstruct.java +++ b/mods/tinker/tconstruct/util/PHConstruct.java @@ -148,6 +148,7 @@ public class PHConstruct heavyChestplate = config.getItem("Equipables", "Heavy Chestplate", 14108).getInt(14108); heavyPants = config.getItem("Equipables", "Heavy Pants", 14109).getInt(14109); heavyBoots = config.getItem("Equipables", "Heavy Boots", 14110).getInt(14110); + glove = config.getItem("Equipables", "Gloves", 14111).getInt(14111); boolean ic2 = true; boolean xycraft = true; @@ -334,6 +335,7 @@ public class PHConstruct public static int heavyChestplate; public static int heavyPants; public static int heavyBoots; + public static int glove; public static int heartCanister; diff --git a/mods/tinker/tconstruct/util/TEventHandler.java b/mods/tinker/tconstruct/util/TEventHandler.java index f4b85126..b501de22 100644 --- a/mods/tinker/tconstruct/util/TEventHandler.java +++ b/mods/tinker/tconstruct/util/TEventHandler.java @@ -1,9 +1,9 @@ package mods.tinker.tconstruct.util; import java.util.ArrayList; +import java.util.List; import java.util.Random; -import mods.natura.entity.NitroCreeper; import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.blocks.logic.LiquidTextureLogic; import mods.tinker.tconstruct.common.TContent; @@ -11,9 +11,11 @@ import mods.tinker.tconstruct.library.crafting.PatternBuilder; import mods.tinker.tconstruct.library.crafting.Smeltery; import mods.tinker.tconstruct.library.crafting.ToolBuilder; import mods.tinker.tconstruct.modifiers.ModAttack; +import mods.tinker.tconstruct.skill.Skill; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.monster.EntityCreeper; import net.minecraft.entity.monster.EntityGhast; import net.minecraft.entity.monster.EntitySkeleton; @@ -23,666 +25,692 @@ import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.EntityDamageSource; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.world.World; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.ForgeSubscribe; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.event.entity.living.LivingHurtEvent; import net.minecraftforge.event.entity.living.LivingSpawnEvent; import net.minecraftforge.event.entity.player.FillBucketEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent; +import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action; import net.minecraftforge.liquids.LiquidStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent; public class TEventHandler { - Random random = new Random(); - - @ForgeSubscribe - public void onHurt (LivingHurtEvent event) - { - if (event.source instanceof EntityDamageSource && event.source.damageType.equals("explosion.player") && ((EntityDamageSource) event.source).getEntity() instanceof NitroCreeper) - { - if (event.entityLiving.worldObj.difficultySetting == 3) - event.ammount /= 2.3; - else - event.ammount /= 1.5; - } - } - - /* Drops */ - @ForgeSubscribe - public void onLivingDrop (LivingDropsEvent event) - { - if (random.nextInt(500) == 0 && event.entityLiving instanceof IMob && event.entityLiving.dimension == 0) - { - ItemStack dropStack = new ItemStack(TContent.heartCanister, 1, 1); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - - if (!event.entityLiving.isChild()) - { - if (event.entityLiving.getClass() == EntityCow.class) - { - int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; - - for (int iter = 0; iter < amount; ++iter) - { - ItemStack dropStack = new ItemStack(Item.leather, 1); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - } - - else if (event.entityLiving.getClass() == EntityChicken.class) - { - int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; - - for (int iter = 0; iter < amount; ++iter) - { - ItemStack dropStack = new ItemStack(Item.feather, 1); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - } - } - - if (event.recentlyHit && event.entityLiving.getClass() == EntitySkeleton.class) - { - EntitySkeleton skeleton = (EntitySkeleton) event.entityLiving; - if (skeleton.getSkeletonType() == 1 && random.nextInt(Math.max(1, 5 - event.lootingLevel)) == 0) - { - ItemStack dropStack = new ItemStack(TContent.materials, 1, 8); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - } - - else if (event.entityLiving.getClass() == EntityGhast.class) - { - ItemStack dropStack = new ItemStack(Item.ghastTear, 1); - EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); - entityitem.delayBeforeCanPickup = 10; - event.drops.add(entityitem); - } - } - - @ForgeSubscribe - public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event) - { - if (event.entityLiving.getClass() == EntitySpider.class && random.nextInt(100) == 0) - { - EntityCreeper creeper = new EntityCreeper(event.entityLiving.worldObj); - spawnEntity(event.entityLiving.posX, event.entityLiving.posY+1, event.entityLiving.posZ, creeper, event.entityLiving.worldObj); - creeper.mountEntity(event.entityLiving); - } - } - - public static void spawnEntity (double x, double y, double z, Entity entity, World world) - { - if (!world.isRemote) - { - entity.setPosition(x, y, z); - ((EntityLiving) entity).initCreature(); - world.spawnEntityInWorld(entity); - } - } - - /* Ore Dictionary */ - @ForgeSubscribe - public void registerOre (OreRegisterEvent evt) - { - if (evt.Name == "battery") - TConstruct.content.modE.batteries.add(evt.Ore); - - else if (evt.Name == "basicCircuit") - TConstruct.content.modE.circuits.add(evt.Ore); - - else if (evt.Name == "plankWood") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Wood"); - } - - else if (evt.Name == "crystalQuartz") - { - ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 2)); - } - - else if (evt.Name == "crystalCerusQuartz") - { - ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 24)); - } - - //Ingots - else if (evt.Name == "ingotCopper") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Copper"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 2)); - } - - else if (evt.Name == "ingotTin") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 3)); - } - - else if (evt.Name == "ingotBronze") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Bronze"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 7)); - } - - else if (evt.Name == "ingotCobalt") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Cobalt"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 5)); - } - - else if (evt.Name == "ingotArdite") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Ardite"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 6)); - } - - else if (evt.Name == "ingotManyullyn") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Manyullyn"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 9)); - } - - else if (evt.Name == "ingotNaturalAluminum") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 4)); - } - - else if (evt.Name == "naturalAluminum") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 4)); - } - - else if (evt.Name == "ingotAluminumBrass") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 8)); - } - - else if (evt.Name == "ingotAlumite") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Alumite"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 10)); - } - - else if (evt.Name == "ingotSteel") - { - PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Steel"); - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 12)); - } - - //Ores - else if (evt.Name == "oreCopper") - { - Smeltery.addMelting(evt.Ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 2)); - } - - else if (evt.Name == "oreTin") - { - Smeltery.addMelting(evt.Ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 3)); - } - - else if (evt.Name == "oreNaturalAluminum") - { - Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 4)); - } - - else if (evt.Name == "oreCobalt") - { - Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 5)); - } - - else if (evt.Name == "oreArdite") - { - Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 6)); - } - - //Blocks - else if (evt.Name == "blockCopper") - { - Smeltery.addMelting(evt.Ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 2)); - } - - else if (evt.Name == "blockTin") - { - Smeltery.addMelting(evt.Ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 3)); - } - - else if (evt.Name == "blockBronze") - { - Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 7)); - } - - else if (evt.Name == "blockNaturalAluminum") - { - Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 4)); - } - - else if (evt.Name == "blockCobalt") - { - Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 5)); - } - - else if (evt.Name == "blockArdite") - { - Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 6)); - } - - else if (evt.Name == "blockManyullyn") - { - Smeltery.addMelting(evt.Ore, 800, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 9)); - } - - else if (evt.Name == "blockAluminumBrass") - { - Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 8)); - } - - else if (evt.Name == "blockAlumite") - { - Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10)); - } - - else if (evt.Name == "blockSteel") - { - Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12)); - } - - //Dust - else if (evt.Name == "dustCopper") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 2)); - } - - else if (evt.Name == "dustTin") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 3)); - } - - else if (evt.Name == "dustBronze") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 7)); - } - - else if (evt.Name == "dustCobalt") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 5)); - } - - else if (evt.Name == "dustArdite") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 6)); - } - - else if (evt.Name == "dustManyullyn") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 9)); - } - - else if (evt.Name == "dustAluminum") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 4)); - } - - else if (evt.Name == "dustNaturalAluminum") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 4)); - } - - else if (evt.Name == "dustAluminumBrass") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 8)); - } - - else if (evt.Name == "dustAlumite") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 10)); - } - - else if (evt.Name == "dustSteel") - { - Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue, 12)); - } - } - - public void unfuxOreDictionary () //TODO: This isn't the best - { - ArrayList ores = OreDictionary.getOres("ingotCopper"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Copper"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 2)); - } - - ores = OreDictionary.getOres("ingotTin"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 3)); - } - - ores = OreDictionary.getOres("ingotBronze"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Bronze"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 7)); - } - - ores = OreDictionary.getOres("ingotCobalt"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Cobalt"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 5)); - } - - ores = OreDictionary.getOres("ingotArdite"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Ardite"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 6)); - } - - ores = OreDictionary.getOres("ingotManyullyn"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Manyullyn"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 9)); - } - - ores = OreDictionary.getOres("naturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 4)); - } - - ores = OreDictionary.getOres("ingotNaturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 4)); - } - - ores = OreDictionary.getOres("ingotAluminumBrass"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 8)); - } - - ores = OreDictionary.getOres("ingotAlumite"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Alumite"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 10)); - } - - ores = OreDictionary.getOres("ingotSteel"); - for (ItemStack ore : ores) - { - PatternBuilder.instance.registerMaterial(ore, 2, "Steel"); - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 12)); - } - - ores = OreDictionary.getOres("oreCopper"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 2)); - } - - ores = OreDictionary.getOres("oreTin"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 3)); - } - - ores = OreDictionary.getOres("oreNaturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 4)); - } - - ores = OreDictionary.getOres("oreCobalt"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 5)); - } - - ores = OreDictionary.getOres("oreArdite"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 6)); - } - - ores = OreDictionary.getOres("blockCopper"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 2)); - } - - ores = OreDictionary.getOres("blockTin"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 3)); - } - - ores = OreDictionary.getOres("blockBronze"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 7)); - } - - ores = OreDictionary.getOres("blockNaturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 4)); - } - - ores = OreDictionary.getOres("blockCobalt"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 5)); - } - - ores = OreDictionary.getOres("blockArdite"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 6)); - } - - ores = OreDictionary.getOres("blockManyullyn"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 800, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 9)); - } - - ores = OreDictionary.getOres("blockAluminumBrass"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 8)); - } - - ores = OreDictionary.getOres("blockAlumite"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10)); - } - - ores = OreDictionary.getOres("blockSteel"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12)); - } - - ores = OreDictionary.getOres("dustCopper"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 2)); - } - - ores = OreDictionary.getOres("dustTin"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 3)); - } - - ores = OreDictionary.getOres("dustBronze"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 7)); - } - - ores = OreDictionary.getOres("dustCobalt"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 5)); - } - - ores = OreDictionary.getOres("dustArdite"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 6)); - } - - ores = OreDictionary.getOres("dustManyullyn"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 9)); - } - - ores = OreDictionary.getOres("dustNaturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 4)); - } - - ores = OreDictionary.getOres("dustAluminumBrass"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 8)); - } - - ores = OreDictionary.getOres("dustAlumite"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 10)); - } - - ores = OreDictionary.getOres("dustSteel"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, - 12)); - } - - ores = OreDictionary.getOres("nuggetIron"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue / 9, 2)); - } - - ores = OreDictionary.getOres("nuggetCopper"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue / 9, 2)); - } - - ores = OreDictionary.getOres("nuggetTin"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue / 9, 3)); - } - - ores = OreDictionary.getOres("nuggetNaturalAluminum"); - for (ItemStack ore : ores) - { - Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, - TConstruct.ingotLiquidValue / 9, 4)); - } - } - - @ForgeSubscribe - public void bucketFill (FillBucketEvent evt) - { - if (evt.current.getItem() == Item.bucketEmpty && evt.target.typeOfHit == EnumMovingObjectType.TILE) - { - int hitX = evt.target.blockX; - int hitY = evt.target.blockY; - int hitZ = evt.target.blockZ; - - if (evt.entityPlayer != null && !evt.entityPlayer.canPlayerEdit(hitX, hitY, hitZ, evt.target.sideHit, evt.current)) - { - return; - } - - int bID = evt.world.getBlockId(hitX, hitY, hitZ); - int meta = -1; - - if (bID == TContent.liquidMetalStill.blockID) - { - LiquidTextureLogic logic = (LiquidTextureLogic) evt.world.getBlockTileEntity(hitX, hitY, hitZ); - meta = logic.getLiquidType(); - } - - if (meta != -1) - { - evt.world.setBlockToAir(hitX, hitY, hitZ); //Set air block - evt.result = new ItemStack(TContent.buckets, 1, meta); - evt.setResult(Result.ALLOW); - } - } - } + Random random = new Random(); + + /* Interact */ + + @ForgeSubscribe + public void interact (PlayerInteractEvent event) + { + if (event.action == Action.RIGHT_CLICK_BLOCK)// && !event.entityPlayer.worldObj.isRemote) + { + List skills = TConstruct.playerTracker.getPlayerStats(event.entityPlayer.username).skillList; + if (skills.size() > 0) + { + Skill walls = TConstruct.playerTracker.getPlayerStats(event.entityPlayer.username).skillList.get(0); + walls.rightClickActivate(event.entityPlayer, event.entityPlayer.worldObj); + } + } + } + + /*@ForgeSubscribe + public void onHurt (LivingHurtEvent event) + { + if (event.source instanceof EntityDamageSource && event.source.damageType.equals("explosion.player") && ((EntityDamageSource) event.source).getEntity() instanceof NitroCreeper) + { + if (event.entityLiving.worldObj.difficultySetting == 3) + event.ammount /= 2.3; + else + event.ammount /= 1.5; + } + }*/ + + /* Drops */ + @ForgeSubscribe + public void onLivingDrop (LivingDropsEvent event) + { + if (random.nextInt(500) == 0 && event.entityLiving instanceof IMob && event.entityLiving.dimension == 0) + { + ItemStack dropStack = new ItemStack(TContent.heartCanister, 1, 1); + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + + if (!event.entityLiving.isChild()) + { + if (event.entityLiving.getClass() == EntityCow.class) + { + int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; + + for (int iter = 0; iter < amount; ++iter) + { + ItemStack dropStack = new ItemStack(Item.leather, 1); + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + } + + else if (event.entityLiving.getClass() == EntityChicken.class) + { + int amount = random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + random.nextInt(3) + random.nextInt(1 + event.lootingLevel) + 1; + + for (int iter = 0; iter < amount; ++iter) + { + ItemStack dropStack = new ItemStack(Item.feather, 1); + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + } + } + + if (event.recentlyHit && event.entityLiving.getClass() == EntitySkeleton.class) + { + EntitySkeleton skeleton = (EntitySkeleton) event.entityLiving; + if (skeleton.getSkeletonType() == 1 && random.nextInt(Math.max(1, 5 - event.lootingLevel)) == 0) + { + ItemStack dropStack = new ItemStack(TContent.materials, 1, 8); + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + } + + else if (event.entityLiving.getClass() == EntityGhast.class) + { + ItemStack dropStack = new ItemStack(Item.ghastTear, 1); + EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, dropStack); + entityitem.delayBeforeCanPickup = 10; + event.drops.add(entityitem); + } + } + + @ForgeSubscribe + public void onLivingSpawn (EntityJoinWorldEvent event) + { + if (event.entity instanceof EntityXPOrb) + { + System.out.println("Entity: " + event.entity); + } + } + + @ForgeSubscribe + public void onLivingSpawn (LivingSpawnEvent.SpecialSpawn event) + { + if (event.entityLiving.getClass() == EntitySpider.class && random.nextInt(100) == 0) + { + EntityCreeper creeper = new EntityCreeper(event.entityLiving.worldObj); + spawnEntity(event.entityLiving.posX, event.entityLiving.posY + 1, event.entityLiving.posZ, creeper, event.entityLiving.worldObj); + creeper.mountEntity(event.entityLiving); + } + } + + public static void spawnEntity (double x, double y, double z, Entity entity, World world) + { + if (!world.isRemote) + { + entity.setPosition(x, y, z); + ((EntityLiving) entity).initCreature(); + world.spawnEntityInWorld(entity); + } + } + + /* Ore Dictionary */ + @ForgeSubscribe + public void registerOre (OreRegisterEvent evt) + { + if (evt.Name == "battery") + TConstruct.content.modE.batteries.add(evt.Ore); + + else if (evt.Name == "basicCircuit") + TConstruct.content.modE.circuits.add(evt.Ore); + + else if (evt.Name == "plankWood") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Wood"); + } + + else if (evt.Name == "crystalQuartz") + { + ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 2)); + } + + else if (evt.Name == "crystalCerusQuartz") + { + ToolBuilder.instance.registerToolMod(new ModAttack("Quartz", new ItemStack[] { evt.Ore }, 11, 24)); + } + + //Ingots + else if (evt.Name == "ingotCopper") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Copper"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 2)); + } + + else if (evt.Name == "ingotTin") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 3)); + } + + else if (evt.Name == "ingotBronze") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Bronze"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 7)); + } + + else if (evt.Name == "ingotCobalt") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Cobalt"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 5)); + } + + else if (evt.Name == "ingotArdite") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Ardite"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 6)); + } + + else if (evt.Name == "ingotManyullyn") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Manyullyn"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 9)); + } + + else if (evt.Name == "ingotNaturalAluminum") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 4)); + } + + else if (evt.Name == "naturalAluminum") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 4)); + } + + else if (evt.Name == "ingotAluminumBrass") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 8)); + } + + else if (evt.Name == "ingotAlumite") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Alumite"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 10)); + } + + else if (evt.Name == "ingotSteel") + { + PatternBuilder.instance.registerMaterial(evt.Ore, 2, "Steel"); + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 12)); + } + + //Ores + else if (evt.Name == "oreCopper") + { + Smeltery.addMelting(evt.Ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 2)); + } + + else if (evt.Name == "oreTin") + { + Smeltery.addMelting(evt.Ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 3)); + } + + else if (evt.Name == "oreNaturalAluminum") + { + Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 4)); + } + + else if (evt.Name == "oreCobalt") + { + Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 5)); + } + + else if (evt.Name == "oreArdite") + { + Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 6)); + } + + //Blocks + else if (evt.Name == "blockCopper") + { + Smeltery.addMelting(evt.Ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 2)); + } + + else if (evt.Name == "blockTin") + { + Smeltery.addMelting(evt.Ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 3)); + } + + else if (evt.Name == "blockBronze") + { + Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 7)); + } + + else if (evt.Name == "blockNaturalAluminum") + { + Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 4)); + } + + else if (evt.Name == "blockCobalt") + { + Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 5)); + } + + else if (evt.Name == "blockArdite") + { + Smeltery.addMelting(evt.Ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 6)); + } + + else if (evt.Name == "blockManyullyn") + { + Smeltery.addMelting(evt.Ore, 800, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 9)); + } + + else if (evt.Name == "blockAluminumBrass") + { + Smeltery.addMelting(evt.Ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 8)); + } + + else if (evt.Name == "blockAlumite") + { + Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10)); + } + + else if (evt.Name == "blockSteel") + { + Smeltery.addMelting(evt.Ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12)); + } + + //Dust + else if (evt.Name == "dustCopper") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 2)); + } + + else if (evt.Name == "dustTin") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 3)); + } + + else if (evt.Name == "dustBronze") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 7)); + } + + else if (evt.Name == "dustCobalt") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 5)); + } + + else if (evt.Name == "dustArdite") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 6)); + } + + else if (evt.Name == "dustManyullyn") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 9)); + } + + else if (evt.Name == "dustAluminum") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 4)); + } + + else if (evt.Name == "dustNaturalAluminum") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 4)); + } + + else if (evt.Name == "dustAluminumBrass") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 8)); + } + + else if (evt.Name == "dustAlumite") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 10)); + } + + else if (evt.Name == "dustSteel") + { + Smeltery.addMelting(new ItemStack(evt.Ore.itemID, 2, evt.Ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue, 12)); + } + } + + public void unfuxOreDictionary () //TODO: This isn't the best + { + ArrayList ores = OreDictionary.getOres("ingotCopper"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Copper"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 2)); + } + + ores = OreDictionary.getOres("ingotTin"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 3)); + } + + ores = OreDictionary.getOres("ingotBronze"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Bronze"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 7)); + } + + ores = OreDictionary.getOres("ingotCobalt"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Cobalt"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 5)); + } + + ores = OreDictionary.getOres("ingotArdite"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Ardite"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 6)); + } + + ores = OreDictionary.getOres("ingotManyullyn"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Manyullyn"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 9)); + } + + ores = OreDictionary.getOres("naturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 4)); + } + + ores = OreDictionary.getOres("ingotNaturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 4)); + } + + ores = OreDictionary.getOres("ingotAluminumBrass"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 8)); + } + + ores = OreDictionary.getOres("ingotAlumite"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Alumite"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 10)); + } + + ores = OreDictionary.getOres("ingotSteel"); + for (ItemStack ore : ores) + { + PatternBuilder.instance.registerMaterial(ore, 2, "Steel"); + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 12)); + } + + ores = OreDictionary.getOres("oreCopper"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 2)); + } + + ores = OreDictionary.getOres("oreTin"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 3)); + } + + ores = OreDictionary.getOres("oreNaturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 4)); + } + + ores = OreDictionary.getOres("oreCobalt"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 5)); + } + + ores = OreDictionary.getOres("oreArdite"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 2, 6)); + } + + ores = OreDictionary.getOres("blockCopper"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 550, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 2)); + } + + ores = OreDictionary.getOres("blockTin"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 275, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 3)); + } + + ores = OreDictionary.getOres("blockBronze"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 7)); + } + + ores = OreDictionary.getOres("blockNaturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 4)); + } + + ores = OreDictionary.getOres("blockCobalt"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 5)); + } + + ores = OreDictionary.getOres("blockArdite"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 6)); + } + + ores = OreDictionary.getOres("blockManyullyn"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 800, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 9)); + } + + ores = OreDictionary.getOres("blockAluminumBrass"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 8)); + } + + ores = OreDictionary.getOres("blockAlumite"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 10)); + } + + ores = OreDictionary.getOres("blockSteel"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(ore, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue * 9, 12)); + } + + ores = OreDictionary.getOres("dustCopper"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 2)); + } + + ores = OreDictionary.getOres("dustTin"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 3)); + } + + ores = OreDictionary.getOres("dustBronze"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 4, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 7)); + } + + ores = OreDictionary.getOres("dustCobalt"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 0, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 5)); + } + + ores = OreDictionary.getOres("dustArdite"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 1, 650, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 6)); + } + + ores = OreDictionary.getOres("dustManyullyn"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 2, 750, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 9)); + } + + ores = OreDictionary.getOres("dustNaturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 4)); + } + + ores = OreDictionary.getOres("dustAluminumBrass"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 7, 350, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 8)); + } + + ores = OreDictionary.getOres("dustAlumite"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 8, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 10)); + } + + ores = OreDictionary.getOres("dustSteel"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 9, 500, new LiquidStack(TContent.liquidMetalStill.blockID, TConstruct.ingotLiquidValue, + 12)); + } + + ores = OreDictionary.getOres("nuggetIron"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue / 9, 2)); + } + + ores = OreDictionary.getOres("nuggetCopper"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 3, 450, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue / 9, 2)); + } + + ores = OreDictionary.getOres("nuggetTin"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 5, 175, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue / 9, 3)); + } + + ores = OreDictionary.getOres("nuggetNaturalAluminum"); + for (ItemStack ore : ores) + { + Smeltery.addMelting(new ItemStack(ore.itemID, 2, ore.getItemDamage()), TContent.metalBlock.blockID, 6, 250, new LiquidStack(TContent.liquidMetalStill.blockID, + TConstruct.ingotLiquidValue / 9, 4)); + } + } + + @ForgeSubscribe + public void bucketFill (FillBucketEvent evt) + { + if (evt.current.getItem() == Item.bucketEmpty && evt.target.typeOfHit == EnumMovingObjectType.TILE) + { + int hitX = evt.target.blockX; + int hitY = evt.target.blockY; + int hitZ = evt.target.blockZ; + + if (evt.entityPlayer != null && !evt.entityPlayer.canPlayerEdit(hitX, hitY, hitZ, evt.target.sideHit, evt.current)) + { + return; + } + + int bID = evt.world.getBlockId(hitX, hitY, hitZ); + int meta = -1; + + if (bID == TContent.liquidMetalStill.blockID) + { + LiquidTextureLogic logic = (LiquidTextureLogic) evt.world.getBlockTileEntity(hitX, hitY, hitZ); + meta = logic.getLiquidType(); + } + + if (meta != -1) + { + evt.world.setBlockToAir(hitX, hitY, hitZ); //Set air block + evt.result = new ItemStack(TContent.buckets, 1, meta); + evt.setResult(Result.ALLOW); + } + } + } } diff --git a/mods/tinker/tconstruct/util/network/TPacketHandler.java b/mods/tinker/tconstruct/util/network/TPacketHandler.java index b34a7c28..cef35108 100644 --- a/mods/tinker/tconstruct/util/network/TPacketHandler.java +++ b/mods/tinker/tconstruct/util/network/TPacketHandler.java @@ -6,9 +6,10 @@ import java.io.IOException; import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.blocks.logic.ToolStationLogic; -import mods.tinker.tconstruct.inventory.SmelteryContainer; import mods.tinker.tconstruct.library.blocks.InventoryLogic; +import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet250CustomPayload; @@ -31,7 +32,7 @@ public class TPacketHandler implements IPacketHandler if (packet.channel.equals("TConstruct")) { if (side == Side.SERVER) - handleServerPacket(packet); + handleServerPacket(packet, (EntityPlayerMP) player); else handleClientPacket(packet); } @@ -60,7 +61,7 @@ public class TPacketHandler implements IPacketHandler } } - void handleServerPacket (Packet250CustomPayload packet) + void handleServerPacket (Packet250CustomPayload packet, EntityPlayerMP player) { DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(packet.data)); @@ -104,23 +105,23 @@ public class TPacketHandler implements IPacketHandler else if (packetID == 3) //Armor { - String user = inputStream.readUTF(); - EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); + //String user = inputStream.readUTF(); + //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); player.openGui(TConstruct.instance, TConstruct.proxy.armorGuiID, player.worldObj, (int)player.posX, (int)player.posY, (int)player.posZ); } + else if (packetID == 4) //Active Skills + { + Byte id = inputStream.readByte(); + TConstruct.playerTracker.activateSkill(player, id); + } + else if (packetID == 10) //Double jump { - String user = inputStream.readUTF(); - EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); + //String user = inputStream.readUTF(); + //EntityPlayer player = TConstruct.playerTracker.getEntityPlayer(user); player.fallDistance = 0; } - /*else if (packetID == 11) - { - String user = inputStream.readUTF(); - float size = inputStream.readFloat(); - TConstruct.playerTracker.updateSize(user, size); - }*/ } catch (IOException e) { @@ -129,4 +130,14 @@ public class TPacketHandler implements IPacketHandler return; } } + + Entity getEntity (World world, int id) + { + for (Object o : world.loadedEntityList) + { + if (((Entity)o).entityId == id) + return (Entity) o; + } + return null; + } } diff --git a/mods/tinker/tconstruct/util/player/ArmorExtended.java b/mods/tinker/tconstruct/util/player/ArmorExtended.java index d0a8b90c..844476d6 100644 --- a/mods/tinker/tconstruct/util/player/ArmorExtended.java +++ b/mods/tinker/tconstruct/util/player/ArmorExtended.java @@ -4,6 +4,7 @@ import java.lang.ref.WeakReference; import mods.tinker.tconstruct.TConstruct; import mods.tinker.tconstruct.common.TContent; +import mods.tinker.tconstruct.library.SkillRegistry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -55,7 +56,9 @@ public class ArmorExtended implements IInventory { inventory[slot] = null; } - recalculateHealth(); + EntityPlayer player = parent.get(); + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + recalculateHealth(player, stats); return split; } else @@ -79,7 +82,10 @@ public class ArmorExtended implements IInventory { itemstack.stackSize = getInventoryStackLimit(); } - recalculateHealth(); + + EntityPlayer player = parent.get(); + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + recalculateHealth(player, stats); } @Override @@ -103,10 +109,38 @@ public class ArmorExtended implements IInventory @Override public void onInventoryChanged () { - recalculateHealth(); + EntityPlayer player = parent.get(); + TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); + recalculateSkills(player, stats); + recalculateHealth(player, stats); } - public void recalculateHealth() + public void recalculateSkills(EntityPlayer player, TPlayerStats stats) + { + if (inventory[1] != null && inventory[1].getItem() == TContent.glove) + { + if (stats.skillList.size() < 1) + { + try + { + stats.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + } + else + { + if (stats.skillList.size() > 0) + { + stats.skillList.remove(0); + } + } + } + + public void recalculateHealth(EntityPlayer player, TPlayerStats stats) { if (inventory[6] != null && inventory[6].getItem() == TContent.heartCanister) { @@ -114,8 +148,6 @@ public class ArmorExtended implements IInventory int meta = stack.getItemDamage(); if (meta == 2) { - EntityPlayer player = parent.get(); - TPlayerStats stats = TConstruct.playerTracker.getPlayerStats(player.username); int bonusHP = stack.stackSize * 2; stats.bonusHealth = bonusHP; player.maxHealth = 20 + bonusHP; @@ -147,7 +179,7 @@ public class ArmorExtended implements IInventory return false; } - //Save/Load + /* Save/Load */ public void saveToNBT (EntityPlayer entityplayer) { NBTTagCompound tags = entityplayer.getEntityData(); @@ -168,7 +200,7 @@ public class ArmorExtended implements IInventory tags.setTag("TConstruct.Inventory", tagList); } - public void loadFromNBT (EntityPlayer entityplayer) + public void readFromNBT (EntityPlayer entityplayer) { NBTTagCompound tags = entityplayer.getEntityData(); NBTTagList tagList = tags.getTagList("TConstruct.Inventory"); diff --git a/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java b/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java new file mode 100644 index 00000000..0486db56 --- /dev/null +++ b/mods/tinker/tconstruct/util/player/ArmorExtendedClient.java @@ -0,0 +1,35 @@ +package mods.tinker.tconstruct.util.player; + +import mods.tinker.tconstruct.client.TProxyClient; +import mods.tinker.tconstruct.common.TContent; +import mods.tinker.tconstruct.library.SkillRegistry; +import net.minecraft.entity.player.EntityPlayer; + +public class ArmorExtendedClient extends ArmorExtended +{ + /*public void recalculateSkills(EntityPlayer player, TPlayerStats stats) + { + System.out.println("Client skills"); + if (inventory[1] != null && inventory[1].getItem() == TContent.glove) + { + if (TProxyClient.skillList.size() < 1) + { + try + { + TProxyClient.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + } + else + { + if (TProxyClient.skillList.size() > 0) + { + TProxyClient.skillList.remove(0); + } + } + }*/ +} diff --git a/mods/tinker/tconstruct/util/player/TPlayerHandler.java b/mods/tinker/tconstruct/util/player/TPlayerHandler.java index 55c257fb..74b32431 100644 --- a/mods/tinker/tconstruct/util/player/TPlayerHandler.java +++ b/mods/tinker/tconstruct/util/player/TPlayerHandler.java @@ -1,11 +1,15 @@ package mods.tinker.tconstruct.util.player; import java.lang.ref.WeakReference; +import java.util.ArrayList; import java.util.Random; import java.util.concurrent.ConcurrentHashMap; import mods.tinker.tconstruct.common.TContent; +import mods.tinker.tconstruct.library.SkillRegistry; import mods.tinker.tconstruct.library.tools.AbilityHelper; +import mods.tinker.tconstruct.skill.Skill; +import mods.tinker.tconstruct.skill.WallBuilding; import mods.tinker.tconstruct.util.PHConstruct; import net.minecraft.entity.Entity; import net.minecraft.entity.EnumEntitySize; @@ -28,6 +32,7 @@ public class TPlayerHandler implements IPlayerTracker @Override public void onPlayerLogin (EntityPlayer entityplayer) { + System.out.println("Player: "+entityplayer); //Lookup player TFoodStats food = new TFoodStats(); food.readStats(entityplayer.foodStats); @@ -41,7 +46,7 @@ public class TPlayerHandler implements IPlayerTracker stats.player = new WeakReference(entityplayer); stats.armor = new ArmorExtended(); stats.armor.init(entityplayer); - stats.armor.loadFromNBT(entityplayer); + stats.armor.readFromNBT(entityplayer); stats.level = entityplayer.experienceLevel; stats.hunger = entityplayer.getFoodStats().getFoodLevel(); @@ -59,9 +64,38 @@ public class TPlayerHandler implements IPlayerTracker } } + stats.skillList = new ArrayList(); + stats.armor.recalculateSkills(entityplayer, stats); + /*try + { + stats.skillList.add(SkillRegistry.skills.get("Wall Building").copy()); + } + catch (Exception e) + { + e.printStackTrace(); + }/* + //stats.skillList.add(new ActiveSkill(new Jump())); + /*for (Map.Entry entry : SkillRegistry.skills.entrySet()) + { + SkillBase skill = entry.getValue(); + }*/ + playerStats.put(entityplayer.username, stats); } + public void activateSkill (EntityPlayer player, int slot) + { + TPlayerStats stats = getPlayerStats(player.username); + if (stats.skillList.size() > slot) + { + Skill skill = stats.skillList.get(slot); + if (skill != null) + { + skill.activate(player, player.worldObj); + } + } + } + @Override public void onPlayerLogout (EntityPlayer entityplayer) { @@ -85,9 +119,10 @@ public class TPlayerHandler implements IPlayerTracker if (clean) playerStats.remove(player.username); } - else //Revalidate all players + else + //Revalidate all players { - + } } } @@ -98,7 +133,7 @@ public class TPlayerHandler implements IPlayerTracker //Boom! TPlayerStats stats = getPlayerStats(entityplayer.username); stats.player = new WeakReference(entityplayer); - stats.armor.recalculateHealth(); + stats.armor.recalculateHealth(entityplayer, stats); TFoodStats food = new TFoodStats(); entityplayer.foodStats = food; diff --git a/mods/tinker/tconstruct/util/player/TPlayerStats.java b/mods/tinker/tconstruct/util/player/TPlayerStats.java index acf26682..52d6f99f 100644 --- a/mods/tinker/tconstruct/util/player/TPlayerStats.java +++ b/mods/tinker/tconstruct/util/player/TPlayerStats.java @@ -1,11 +1,10 @@ package mods.tinker.tconstruct.util.player; import java.lang.ref.WeakReference; +import java.util.List; +import mods.tinker.tconstruct.skill.Skill; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import cpw.mods.fml.common.FMLCommonHandler; public class TPlayerStats { @@ -18,4 +17,5 @@ public class TPlayerStats public boolean materialManual; public boolean smelteryManual; public ArmorExtended armor; + public List skillList; } diff --git a/mods/tinker/textures/items/armor/dirthand.png b/mods/tinker/textures/items/armor/dirthand.png new file mode 100644 index 0000000000000000000000000000000000000000..ed069069d6c2f8eadbe9d2d6c482fbd1623c0b0e GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4I0@c)CG7oGt{I14-? ziy0XB4uLSEsD@VqP>{XE)7O>#E*ldoujT64HCKQ__dQ)4Lo80;owSjwDL|stelfd; zl#q&%y0~XXA!m=6{KAdLU%bsK5s8WsQeJd>lJDB>OQok(W^-Fze){~M{C`WCANjt2 z8|VCDUitg-HQn}kzWc8;PGDGl_S_FChJcPqPE%Uut#$h(x`_V*rl}h e+&$5k-*+)`h{hh7@bo&!_Y9t{elF{r5}E*Q>4h)= literal 0 HcmV?d00001 diff --git a/mods/tinker/textures/skill/Float48x.png b/mods/tinker/textures/skill/Float48x.png new file mode 100644 index 0000000000000000000000000000000000000000..5061c90da3f34c8fee43f7bac0fd2d6ae8d21f8b GIT binary patch literal 2273 zcmV<72p;!|P)ue`pX%Dn+J0N|8aEA~ePn3RNV8Vs%1E=Vm6!^2dIyz0bLK zA_@}dh1}WqoPE|_&u=|WXz&w{3hv+!;|~A)9|ic|7~bk1cYo}YcZAm8dG)vT0yGT+ z1c(4cT1W08g(b*oP$+7WK=J1TOFz3UMqb(cd59zFs8DH``~s=(dI6dyG8G=BAW*yt zkUv(!J_7E4doI#xHBENNrcLW>1^D5Qx%|PEl31H z00othKmdpc7z82m0ytV9x%|@#)7=;@Ki5|rol7715*jy`!Nx*@wlv3rLaHtT^ffq{ zG}AlD}^^v?;vhklX;uA z8bzJAu>H-Mo{ZNq`-g2ev2Ekmy*oN;Eybk7IFe}n+)D8DDKiG&mD z&Y#5f8iucpd;=iDpWi-#v9S?cTw2DC&Ha)2g@yANzW0cuMFf!q2aaL?I|N_Qo_Ib; z3EWeFhK**+obToeV4AqG^KjCJ^3;|Wab)Yau(0q9#xMfx*bjMDn-FY82-n9`sHus}FeMAawTHvFvtWxYOxi^}SWJ=g-A^FFtZMuE!TA;(G7S`_Nd|Kwn><7wC9K zb7K8>QZ+!x+z4yIXe;CaN}Bl9(o}_E0O)i&c<7X!DnSrP9%f+cE$ZMSr9va;hE#(CIzM}Qie^!lZ3y=W6c&Cl_{=K-o+Qijs zS8Ev#pGWU{+Jzkv$OrrzZ~RpmQ(z5Y|2=I0!2Du6dp-!XZ_g+O)(>E7V+HN`DeS+y zT?anh1t1BiLYN$!LVLcdg~`FG5=k?cB>^S}kK)jUgP0zk@xVgpZ`oKOPHvgX_Mcj; zIj7hoHAqx(p)yPkY&(_!p@`=!#HhYU`OV9(0|2HUoWY?B2OYgChT*`rW0e>U<%{I` zdu^dTJZGa7yrsN51kGzJ zeD6<>gPCBNV58OCxz?Xy39t+&grZj)1J-b=c6A@>aW3`8+HcvZK`17yR7BF6qci6c zWg}lRS|P9RUMNIVxC?1*CKG3_RJa%i%_|zu+@EV+ufP53*E}7QT-IA5#h<>{%K}W5 zjwnPwscuSQUzWG~ls!k0l2+Tf4YQRsGl4)w@~k_rnvb~>R29u424o0S%LLYb8TW=5 zNC9n?)=pl28jW?0Z2i#aE*xI`YG&1dfHt#4vQ7^a@^Bbj$#8kArqSPOE&tCdX|u6ya~? zf#>k+mwq1^*35t9vk&9YD_<^9jXi8~hECke0@lDY!LS|{4SBbSfn2PMpkq!}i!R`; z1^@%=2e4yvzweb_inTw0=!QmvNoEnZ?(Rawu#_ZcQ|18g(}ofnk-G0QH3!YdeBs;? zfNxaJ;U}ZB+3)8@XVZDcofVTBaZ0Ye@&Gfdl2UaNx*;GpXcAHQ9H$rM7&9--XUFF7 z*!(0;jm<#_m>oNX$L7C)*|E7|8iLw}iTqHks{qDON?c`P$p))o6vA0ImRb)rz>0~_ zDdP0*IVCXR^zPFcT{nqS@{k%ZfLs;W)dIwomW_%jH>p8vJe2Y|T4kC;YR*Zd6rgKP zPFW+H36&nuqoHwb>JD)43Dmm)swOAOR>-c^&vZ16vXCy485P%wY6}fpR-^er0tiFO zsc`HiyY;F%Z#o(|Qxfr``n+Ur8@n--)4N&$xTamu&M4J4C$v@*7b>0ku@qn#~d*vs+3Z$nDHQsLG}Q_nPA3Gq39=9j3|5sH*qoD5nr2&%f81Z^-tYIl z=iDDs*n^k%efN96=brO9=X}n+=Y>|?{6)cK{9;_@um7_F@7?)@{&Lm2TQ3XL|M~o{ zs|{!~3=kj!5NUkuAo)v>MNcT8NTB$Y1ULQb@PDPuAC`XwK?>zgNe4*%tu~;|1f_y5 z-k>lFki7%(^W2{sU;Rap)!t^3g_bSrs5IcF*Q}uz7X>d}J&g0UtE1}iPnA7o1KNuM zBmyCTJR~IXnM;=dHqL+mHa_u>CrU~;QaFEIT(q+0uDu6si?5@-FbZVvY5lc{2kJF; z*jm)%Gd_gubbjXoE}1%d{`z>Lcq^s<{>r~gW9P2h3IWhA0;#P)T}bIGSu|1eByKBA z5^dUR6fp;C9q4}PU{l4bl%4{FIB`L-QOtWs& zt$GlLrhkZ`zFutJFo5H~eHK_WxU*{%KmX$oP?&f;xog#UqCEL65w!@R3KETkkmd8_ z-*)2krjr3_ZHT}2p7_lSP%jE>`Ow3doZg9{zFypM%gruqMo}2XmJdISeEZ|+lo}j= zDnlseloIDuNZK|tg8euU44Iodhn}8pjv z*IacC4j$iS=jZ9CuA8&a|M=RqW^eSynggib=~h4U(DePKv3Jcvq{?`S*pp&I2_H{= z;7OM&5uTo&?tuR24HNb}LF9_7ln#rdH|$mGG%B3ZyenZ0!!Tf&!Ng!D824r-7$O*A zJLVW;;*}qvwzP(g1N|6(@mnxl<~(-u?WdK&K^DUhf!(Ju?$haEKb;P4eq#fez-+)o zC=6LcyyC3ic9HQcb_b85?dIp^xo#?79mJKi*!_FDvLx-KRtUyXa)`8@KHLXI3 zC<_--iz*i<#yOXE)fO>!bP7Ma@gN3I45O!~8~fKB!1vDHSE-!$V3cDNcpPN=u-3pf zWTAqobRzQEPwF%!$+4X9NZ(`l_R+0)r0-zq$Y*nlL28?q%LxbitbtWtuUyKw#1;zK z$Oaazf@3JLj!Py?d}h+dE)ypDClfDxXL@T07ytIpa)!2Mz#_R9z0=SG;iiPFPR|4q zH+clMnC2US`04SmJdQd!UzWjV3I_A?|Iw!%`P%KK95VCb)mb#Cds* z`1*7AMqUpxl{~T@^^|I5=Xt_``5LegoDz(}(WxOD7BP{t>n!QmJu~^aCrUNKkTcpV zuRb{d;XX+biSdQZUNZO zQ0$6PzL}$JUoF;t#f$Oikv6b=jd<#or)&ZnS#qQ-c~>~Jt{a_IDQ&$tVvkBmNWb#) zl7ww+hDc>+p}LSIIj)0I%DmYp^xI*>*C^-vZNDG zsFc0;if_#MDD_XITGmn$Z&R^uV{S}sV1wc2gz?!{$93$^JBU_$(rXqexx>%lr_{cnt%VFJ>ECq by}kYeiL?hbxLVa{00000NkvXXu0mjf^R7i= literal 0 HcmV?d00001 diff --git a/mods/tinker/textures/skill/Wall16x.png b/mods/tinker/textures/skill/Wall16x.png new file mode 100644 index 0000000000000000000000000000000000000000..48ddf36ea0e0db94909d35f411494b7c430a969f GIT binary patch literal 708 zcmV;#0z3VQP)0#Qjs zK~y-)rIS5x(?A@DpR=7y94E2eHVsu%N+p5{6CwjFT~G%YP)7!kI`mU80TW+>g@J*U z0aXI20wGlll#YanmR8D}nin@OzSuE?+aRQdg(Pw*X#m2J62s~*NB2LuKaW}#z?H)1ym^`28tGesAfNdWQ2l$Fw? zB{kDc5{|~mOoExBOK~>CB`5vo2CIuMi4KfNR+Yt&iSIO9&C&xv}Z} z=)TPYJYIjcmo!a|MK8{LYilc7TU(>uZj($V3B&j`ecwk2f$O>mAui;*ySo^k=TWIt zux*=GtMyk&n$0GqQi)ovb|F7FIKa?#9e_@!gKgUrI2a5tO%uZ~rt(xOg`t!piX!^` zKD}NKDJ4M=5Cj2IN_^j+%E#j|hLn=!N&99pdw!{Lx12qvLT%6*JhPrV{`F1xrap zK~z}7#g|WP6jdC@KW}DsX8*yILPH@T1QcTrD1ycWf|MR0ARbIiDv1Y(7d+sR0~dSI z11F;f|Jkz;J^GIsDL5l0j$gFvc?LLiVJ1#_KSkaiM_t8Y_` z?ChUlZ0syU?4-7(2LSIckFl}K^q42W?3hoqYO!3rb^%$((g-P9s1``bNWGL20c1GI zA6MomOn-@KnymZh7#q`jItUhh6i98qXm=#;fW1`SBb=C8a~6Q%L;C^v{JT#9*jjw6 zwOz|Ow|uNN0hU_-qIa$S@9B?XdPa^O=7v|LR;y_t13f85Mn8_t+g>?|MCw%w#9|_L z3dpo?K^XE&;{9a_8&A4n#)EOE5fFbKtlt*G&2cjGhz$?yaMn>OTk_tyMrx!Oeh>xWmizCiyK=94@ zyN|#|{y#!M{7@Wr-l07uIx~X>`1;4|(Q_|koJ1VknRKG9I@)qT96NSQ0t^lg5(EL| za+z#4OQX@C*=)u{*|yEYhYv9f11TjF6BF#)w-4X;OfwylAwRElb~s{7?~nOdzzv)QCnDv{6U_1H@Biq{H)K&w*|ZQG_^uWNvMRzdsv z`k0-a#V`yU$Dv-Ylg(zk!r!}hFA`uFhMv?8a$R>xA{7b+ve~Q-7KS0sW>XV(gIBy( z7=}yssa!5=%T!RcN<~zuRIn@yDdm5{D_+a8tkwrZ5(EJY3(*CmSS-eDYc`wA&d%aE z4#{MaWHL#$TBTmEJy4-5D8m77U4PGh!;>C-R00qwFaylr0 z=Xr!-i065+J-vVbz9wrgKehKO#VcMz2!RkHmMp1M3deCUO%u~JV>N8sb}YkP*Tr?+ zuJMXDb`Ge()oS$RlTwmMBuJ%F6bgmt;*!nAYF!2I7O!|?=Rhiz($9@XgD?!K)oPSV zC2ehct#|gj!7E-P3`3onrBaDfsiY^VI(J=H2Un|9w%fL?ORXEc;??JX=XoR&34$OX zolfJrF23(mtyYD4}W zZcea&vq{P?Fn;Mg!_W1y#d*k2moBkuy=0x7Bf04r#N;KCl|0*4`P2)yyTVW1xK1!P zgSmZk-v~fYHbqlPisdRhw{7IY)hXO;l7;?VSmjxY7U|BWK=2Cr{K%7Mq#3?6g) Y7vZvU&yg+&=l}o!07*qoM6N<$f?5H#%m4rY literal 0 HcmV?d00001 diff --git a/mods/tinker/textures/skill/Wall48x.png b/mods/tinker/textures/skill/Wall48x.png new file mode 100644 index 0000000000000000000000000000000000000000..81a6f2ee1fcbc1e4f438ec2fe1aad1e5cf55bc1a GIT binary patch literal 1944 zcmV;J2WR++P)%7BL-xl>7hy2PH{F zK~!ko?U-F?9M=`ce|L6vch(wZWG9N`6cM|oA8K&Z*r`g3RM*DFiA`x93aKeBcA*#= z8X9UELSFRJm(q|>NNGr)N{cD+v$MN%`>->2 z?(DAYwDE3h@CB`Q?#%z3^FN<+SM2@jwqVHb37lPOoG6}hoAXKprc#A{jZJImyVCf{Auvpcg5ZQ+aJ3V z$fOJqASDO^adEUZ1@QF0eoZahy|wJ#>+<0%w|~Q59{o`ow)0@(sZP!SOd zcMG5RE~0e@89f(%2*5Mm=Gd`AjE;{oK9p0k=Sx*q=U17X{X16hJtWEAAws*PgluGb z{Lzh1CxNVKBBVqL5HduFSe1|+v9VF4 zMd(=>c}urg>X&zjfR#2vVJ+b?CQ6|Q91;+rVi`t6v?B7T`2w@EZz>Xz@x$2{KuAPr zMC7vnoq$V?@&O^=$0eXjmXEwn-lwFJh}Kj6yJuV85&fHC{URy3vN zZOzCi3Q|ZF{bZtsX(r{JB9KxJZh1FeGW-yF(niq@Q||pezf1^!{@J7I`|tkncH-Xt z;)PI;R+?e@v?3BaNJU=AI~Q@*Olf&9LQlkAm!aVzbizLd-%JRbK68rsQkAU_w;0?r zi064&mZiu<`{P47rZ2sfz<##;eN^#9-jksnkwS@zMt1^fGZEJIbb8PFc~^ry&!fIw zXZq5Nx_4yXIIlkSGj;uws~5QvrW3%aFFj3qR~pN*LPEbt$o{nfzY?m}ve`DY>%rIAS5&S*AmY}gr0x)D9(VxV`-o1ORqB}F4AR=wG&9GUMvJ0=f_N6`e_I2 zoH#+P zRwD=kHa9mJ7#P4bP0Hmmwr%5i9;sAJydU^{J|9P*(P*fPg@pxd+XkRiDiH($rBaD< zxlFa%D&CEa_^`6Jwx+#DWt369#_Kj4hG7u>Ma*-#9NBD^R4PR(l~UkHk>fb(+Ho8l z$HDjgzTtJ7%^(Qk_w(Ul0IJniZXs$) zQP?w?44F)(?|2mf8MY-UC6!8rMx(*5UAu4`hgz*hwOZxYty>HX3{bDvDHe;W$N;vt zw-X(tA9&qnaqiqX8Mpno$Le_|gupaSf*?RjnYb6VK-t!xdx;m?G&A*!$;nC8%Iftx z&1RG2ku$^A))t0gAf=>GC~)M+5o)y>mSxdsH2Q+ScI{gCIk2&@f$O?>o~QQK*VhvT z6yr^Tg0M)Ofur-@amY0{wX0uq9 zg=JY(t5tm8r&g<};_3%JF$d0`J$uKW*MlHvy)>C7LI{%iVUT%NnJ<4aalbeHFDu(Voa>dE~o9eRyl(uz1i;C@^N e_xZZ-3H%$vaIdYAg@~O10000