From 7b242f5141dcc20770c0b73fc4dc6f446cb53f81 Mon Sep 17 00:00:00 2001 From: mDiyo Date: Wed, 24 Apr 2013 18:04:13 -0700 Subject: [PATCH] NEI Plugin things --- mods/tinker/resources/lang/en_US.xml | 2 +- mods/tinker/resources/manuals/smeltery.xml | 2 +- mods/tinker/tconstruct/TConstruct.java | 2 +- mods/tinker/tconstruct/TContent.java | 6 +- mods/tinker/tconstruct/TProxyCommon.java | 1 + .../TClientTickHandler.java | 2 +- .../tinker/tconstruct/client/TKeyHandler.java | 12 +-- .../tconstruct/client/TProxyClient.java | 5 +- .../client/entityrender/RangedItemRender.java | 54 ++++--------- ...DaggerRender.java => DaggerRenderOld.java} | 4 +- .../LaunchedItemRender.java} | 10 +-- mods/tinker/tconstruct/crafting/Smeltery.java | 2 +- .../entity/projectile/DaggerEntity.java | 32 -------- .../{ => projectile}/LaunchedPotion.java | 2 +- .../entity/projectile/RotatingBase.java | 80 +++++++++++++++---- .../tinker/tconstruct/items/FilledBucket.java | 1 + .../items/blocks/LiquidItemBlock.java | 2 +- .../tconstruct/player/TCommonTickHandler.java | 44 ---------- .../tconstruct/server/TProxyServer.java | 14 ---- mods/tinker/tconstruct/tools/Mattock.java | 2 +- .../tconstruct/tools/PotionLauncher.java | 2 +- 21 files changed, 109 insertions(+), 172 deletions(-) rename mods/tinker/tconstruct/{player => client}/TClientTickHandler.java (98%) rename mods/tinker/tconstruct/client/projectilerender/{DaggerRender.java => DaggerRenderOld.java} (95%) rename mods/tinker/tconstruct/client/{entityrender/ThrownItemRender.java => projectilerender/LaunchedItemRender.java} (93%) rename mods/tinker/tconstruct/entity/{ => projectile}/LaunchedPotion.java (99%) delete mode 100644 mods/tinker/tconstruct/player/TCommonTickHandler.java delete mode 100644 mods/tinker/tconstruct/server/TProxyServer.java diff --git a/mods/tinker/resources/lang/en_US.xml b/mods/tinker/resources/lang/en_US.xml index 0b294749..30dc375e 100644 --- a/mods/tinker/resources/lang/en_US.xml +++ b/mods/tinker/resources/lang/en_US.xml @@ -94,7 +94,7 @@ Liquid Cobalt Bucket Liquid Ardite Bucket Liquid Bronze Bucket - Liquid Aluminum Brass Bucket + Liquid Aluminum Brass Bucket Liquid Manyullyn Bucket Liquid Alumite Bucket Liquid Obsidian Bucket diff --git a/mods/tinker/resources/manuals/smeltery.xml b/mods/tinker/resources/manuals/smeltery.xml index 2c888357..c24270e2 100644 --- a/mods/tinker/resources/manuals/smeltery.xml +++ b/mods/tinker/resources/manuals/smeltery.xml @@ -118,7 +118,7 @@ Other liquid removal objects will work, but are frowned upon. An example picture alubrassingot - Manyullyn, made from Cobalt(1) and Ardite(1) + Manyullyn, made from Cobalt(2) and Ardite(2) manyullyningot diff --git a/mods/tinker/tconstruct/TConstruct.java b/mods/tinker/tconstruct/TConstruct.java index e64349e7..c5454152 100644 --- a/mods/tinker/tconstruct/TConstruct.java +++ b/mods/tinker/tconstruct/TConstruct.java @@ -26,7 +26,7 @@ import cpw.mods.fml.common.registry.VillagerRegistry; * @dependencies: IC2 API, EBXL API */ -@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.0.2", dependencies = "required-after:Forge@[7.7.1.659,)") +@Mod(modid = "TConstruct", name = "TConstruct", version = "1.5.1_1.3.0.3", dependencies = "required-after:Forge@[7.7.1.659,)") @NetworkMod(serverSideRequired = false, clientSideRequired = true, channels = { "TConstruct" }, packetHandler = mods.tinker.tconstruct.TPacketHandler.class) public class TConstruct { diff --git a/mods/tinker/tconstruct/TContent.java b/mods/tinker/tconstruct/TContent.java index 234c2af3..37e859e1 100644 --- a/mods/tinker/tconstruct/TContent.java +++ b/mods/tinker/tconstruct/TContent.java @@ -159,7 +159,7 @@ public class TContent implements IFuelHandler void createEntities () { EntityRegistry.registerModEntity(FancyEntityItem.class, "Fancy Item", 0, TConstruct.instance, 32, 5, true); - //EntityRegistry.registerModEntity(DaggerEntity.class, "Dagger", 1, TConstruct.instance, 32, 5, true); + EntityRegistry.registerModEntity(DaggerEntity.class, "Dagger", 1, TConstruct.instance, 32, 5, true); //EntityRegistry.registerModEntity(LaunchedPotion.class, "Launched Potion", 1, TConstruct.instance, 32, 3, true); //EntityRegistry.registerModEntity(GolemBase.class, "Golembase", 2, TConstruct.instance, 32, 5, true); //EntityRegistry.registerModEntity(CartEntity.class, "Small Wagon", 1, TConstruct.instance, 32, 5, true); @@ -323,7 +323,7 @@ public class TContent implements IFuelHandler broadsword = new Broadsword(PHConstruct.broadsword); longsword = new Longsword(PHConstruct.longsword); rapier = new Rapier(PHConstruct.rapier); - //dagger = new Dagger(PHConstruct.dagger); + dagger = new Dagger(PHConstruct.dagger); frypan = new FryingPan(PHConstruct.frypan); battlesign = new BattleSign(PHConstruct.battlesign); @@ -503,7 +503,7 @@ public class TContent implements IFuelHandler tb.addToolRecipe(frypan, frypanHead); tb.addToolRecipe(battlesign, signHead); tb.addToolRecipe(mattock, axeHead, shovelHead); - //tb.addToolRecipe(dagger, swordBlade); + tb.addToolRecipe(dagger, swordBlade); //tb.addToolRecipe(longbow, toolRod, toolRod); //tb.addToolRecipe(lumberaxe, lumberHead); diff --git a/mods/tinker/tconstruct/TProxyCommon.java b/mods/tinker/tconstruct/TProxyCommon.java index 65cf6b26..e443a111 100644 --- a/mods/tinker/tconstruct/TProxyCommon.java +++ b/mods/tinker/tconstruct/TProxyCommon.java @@ -2,6 +2,7 @@ package mods.tinker.tconstruct; import java.io.File; + import cpw.mods.fml.common.registry.LanguageRegistry; /** diff --git a/mods/tinker/tconstruct/player/TClientTickHandler.java b/mods/tinker/tconstruct/client/TClientTickHandler.java similarity index 98% rename from mods/tinker/tconstruct/player/TClientTickHandler.java rename to mods/tinker/tconstruct/client/TClientTickHandler.java index 08a45864..14c99025 100644 --- a/mods/tinker/tconstruct/player/TClientTickHandler.java +++ b/mods/tinker/tconstruct/client/TClientTickHandler.java @@ -1,4 +1,4 @@ -package mods.tinker.tconstruct.player; +package mods.tinker.tconstruct.client; import java.util.EnumSet; diff --git a/mods/tinker/tconstruct/client/TKeyHandler.java b/mods/tinker/tconstruct/client/TKeyHandler.java index d3fbf7a6..56d8eac6 100644 --- a/mods/tinker/tconstruct/client/TKeyHandler.java +++ b/mods/tinker/tconstruct/client/TKeyHandler.java @@ -12,12 +12,12 @@ import cpw.mods.fml.common.TickType; public abstract class TKeyHandler implements ITickHandler { - protected KeyBinding[] keyBindings; - protected KeyBinding[] vKeyBindings; - protected boolean[] keyDown; - protected boolean[] repeatings; - protected boolean[] vRepeatings; - private boolean isDummy; + public KeyBinding[] keyBindings; + public KeyBinding[] vKeyBindings; + public boolean[] keyDown; + public boolean[] repeatings; + public boolean[] vRepeatings; + public boolean isDummy; /** * Pass an array of keybindings and a repeat flag for each one diff --git a/mods/tinker/tconstruct/client/TProxyClient.java b/mods/tinker/tconstruct/client/TProxyClient.java index 2a844c95..1d762594 100644 --- a/mods/tinker/tconstruct/client/TProxyClient.java +++ b/mods/tinker/tconstruct/client/TProxyClient.java @@ -13,6 +13,7 @@ import mods.tinker.tconstruct.TContent; import mods.tinker.tconstruct.TProxyCommon; import mods.tinker.tconstruct.client.blockrender.*; import mods.tinker.tconstruct.client.entityrender.*; +import mods.tinker.tconstruct.client.projectilerender.LaunchedItemRender; import mods.tinker.tconstruct.crafting.ToolBuilder; import mods.tinker.tconstruct.entity.*; import mods.tinker.tconstruct.entity.projectile.*; @@ -111,10 +112,10 @@ public class TProxyClient extends TProxyCommon RenderingRegistry.registerEntityRenderingHandler(GolemBase.class, new GolemRender(0)); RenderingRegistry.registerEntityRenderingHandler(CartEntity.class, new CartRender()); - //RenderingRegistry.registerEntityRenderingHandler(DaggerEntity.class, new RangedItemRender()); + RenderingRegistry.registerEntityRenderingHandler(DaggerEntity.class, new RangedItemRender()); RenderingRegistry.registerEntityRenderingHandler(Skyla.class, new SkylaRender()); RenderingRegistry.registerEntityRenderingHandler(Crystal.class, new CrystalRender()); - RenderingRegistry.registerEntityRenderingHandler(LaunchedPotion.class, new ThrownItemRender(Item.potion, 16384)); + RenderingRegistry.registerEntityRenderingHandler(LaunchedPotion.class, new LaunchedItemRender(Item.potion, 16384)); //RenderingRegistry.registerEntityRenderingHandler(net.minecraft.entity.player.EntityPlayer.class, new PlayerArmorRender()); // <-- Works, woo! addRenderMappings(); diff --git a/mods/tinker/tconstruct/client/entityrender/RangedItemRender.java b/mods/tinker/tconstruct/client/entityrender/RangedItemRender.java index d5d6e961..65eb2647 100644 --- a/mods/tinker/tconstruct/client/entityrender/RangedItemRender.java +++ b/mods/tinker/tconstruct/client/entityrender/RangedItemRender.java @@ -2,6 +2,7 @@ package mods.tinker.tconstruct.client.entityrender; import java.util.Random; +import mods.tinker.tconstruct.entity.projectile.RotatingBase; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.ItemRenderer; @@ -32,7 +33,6 @@ public class RangedItemRender extends Render /** Defines the zLevel of rendering of item on GUI. */ public float zLevel = 0.0F; - public static boolean renderInFrame = false; public RangedItemRender() { @@ -43,16 +43,16 @@ public class RangedItemRender extends Render /** * Renders the item */ - public void doRenderItem (EntityItem par1EntityItem, double par2, double par4, double par6, float par8, float par9) + public void doRenderItem (RotatingBase rotator, double par2, double par4, double par6, float par8, float par9) { this.random.setSeed(187L); - ItemStack itemstack = par1EntityItem.getEntityItem(); + ItemStack itemstack = rotator.getEntityItem(); if (itemstack.getItem() != null) { GL11.glPushMatrix(); - float f2 = shouldBob() ? MathHelper.sin(((float) par1EntityItem.age + par9) / 10.0F + par1EntityItem.hoverStart) * 0.1F + 0.1F : 0F; - float f3 = (((float) par1EntityItem.age + par9) / 20.0F + par1EntityItem.hoverStart) * (180F / (float) Math.PI); + float f2 = shouldBob() ? MathHelper.sin(((float) rotator.age + par9) / 10.0F + rotator.hoverStart) * 0.1F + 0.1F : 0F; + float f3 = (((float) rotator.age + par9) / 20.0F + rotator.hoverStart) * (180F / (float) Math.PI); byte b0 = getMiniBlockCount(itemstack); GL11.glTranslatef((float) par2, (float) par4 + f2, (float) par6); @@ -66,15 +66,8 @@ public class RangedItemRender extends Render if (itemstack.getItem().requiresMultipleRenderPasses()) { - if (renderInFrame) - { - GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F); - GL11.glTranslatef(0.0F, -0.05F, 0.0F); - } - else - { - GL11.glScalef(0.5F, 0.5F, 0.5F); - } + GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F); + GL11.glTranslatef(0.0F, -0.05F, 0.0F); this.loadTexture("/gui/items.png"); @@ -91,25 +84,18 @@ public class RangedItemRender extends Render f4 = (float) (i >> 8 & 255) / 255.0F; f6 = (float) (i & 255) / 255.0F; GL11.glColor4f(f5 * f8, f4 * f8, f6 * f8, 1.0F); - this.renderDroppedItem(par1EntityItem, icon, b0, par9, f5 * f8, f4 * f8, f6 * f8); + this.renderDroppedItem(rotator, icon, b0, par9, f5 * f8, f4 * f8, f6 * f8); } else { - this.renderDroppedItem(par1EntityItem, icon, b0, par9, 1.0F, 1.0F, 1.0F); + this.renderDroppedItem(rotator, icon, b0, par9, 1.0F, 1.0F, 1.0F); } } } else { - if (renderInFrame) - { - GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F); - GL11.glTranslatef(0.0F, -0.05F, 0.0F); - } - else - { - GL11.glScalef(0.5F, 0.5F, 0.5F); - } + GL11.glScalef(0.5128205F, 0.5128205F, 0.5128205F); + GL11.glTranslatef(0.0F, -0.05F, 0.0F); Icon icon1 = itemstack.getIconIndex(); @@ -129,11 +115,11 @@ public class RangedItemRender extends Render float f9 = (float) (l >> 8 & 255) / 255.0F; f5 = (float) (l & 255) / 255.0F; f4 = 1.0F; - this.renderDroppedItem(par1EntityItem, icon1, b0, par9, f8 * f4, f9 * f4, f5 * f4); + this.renderDroppedItem(rotator, icon1, b0, par9, f8 * f4, f9 * f4, f5 * f4); } else { - this.renderDroppedItem(par1EntityItem, icon1, b0, par9, 1.0F, 1.0F, 1.0F); + this.renderDroppedItem(rotator, icon1, b0, par9, 1.0F, 1.0F, 1.0F); } } @@ -145,7 +131,7 @@ public class RangedItemRender extends Render /** * Renders a dropped item */ - private void renderDroppedItem (EntityItem par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7) + private void renderDroppedItem (RotatingBase par1EntityItem, Icon par2Icon, int par3, float par4, float par5, float par6, float par7) { Tessellator tessellator = Tessellator.instance; @@ -165,15 +151,7 @@ public class RangedItemRender extends Render GL11.glPushMatrix(); - if (renderInFrame) - { - GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); - } - else - { - GL11.glRotatef((((float) par1EntityItem.age + par4) / 20.0F + par1EntityItem.hoverStart) * (180F / (float) Math.PI), 0.0F, 1.0F, 0.0F); - } - + GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F); float f12 = 0.0625F; f11 = 0.021875F; ItemStack itemstack = par1EntityItem.getEntityItem(); @@ -467,7 +445,7 @@ public class RangedItemRender extends Render */ public void doRender (Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { - this.doRenderItem((EntityItem) par1Entity, par2, par4, par6, par8, par9); + this.doRenderItem((RotatingBase) par1Entity, par2, par4, par6, par8, par9); } /** diff --git a/mods/tinker/tconstruct/client/projectilerender/DaggerRender.java b/mods/tinker/tconstruct/client/projectilerender/DaggerRenderOld.java similarity index 95% rename from mods/tinker/tconstruct/client/projectilerender/DaggerRender.java rename to mods/tinker/tconstruct/client/projectilerender/DaggerRenderOld.java index b5786be8..af7a2be1 100644 --- a/mods/tinker/tconstruct/client/projectilerender/DaggerRender.java +++ b/mods/tinker/tconstruct/client/projectilerender/DaggerRenderOld.java @@ -7,9 +7,9 @@ import net.minecraft.entity.Entity; import org.lwjgl.opengl.GL11; -public class DaggerRender extends RangedRenderBase +public class DaggerRenderOld extends RangedRenderBase { - public DaggerRender(double d) + public DaggerRenderOld(double d) { System.out.println("new renderer"); shadowSize = 0.15F; diff --git a/mods/tinker/tconstruct/client/entityrender/ThrownItemRender.java b/mods/tinker/tconstruct/client/projectilerender/LaunchedItemRender.java similarity index 93% rename from mods/tinker/tconstruct/client/entityrender/ThrownItemRender.java rename to mods/tinker/tconstruct/client/projectilerender/LaunchedItemRender.java index 4ac148a7..1031684e 100644 --- a/mods/tinker/tconstruct/client/entityrender/ThrownItemRender.java +++ b/mods/tinker/tconstruct/client/projectilerender/LaunchedItemRender.java @@ -1,6 +1,6 @@ -package mods.tinker.tconstruct.client.entityrender; +package mods.tinker.tconstruct.client.projectilerender; -import mods.tinker.tconstruct.entity.LaunchedPotion; +import mods.tinker.tconstruct.entity.projectile.LaunchedPotion; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.entity.Entity; @@ -16,18 +16,18 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) -public class ThrownItemRender extends Render +public class LaunchedItemRender extends Render { private Item field_94151_a; private int field_94150_f; - public ThrownItemRender(Item par1, int par2) + public LaunchedItemRender(Item par1, int par2) { this.field_94151_a = par1; this.field_94150_f = par2; } - public ThrownItemRender(Item par1) + public LaunchedItemRender(Item par1) { this(par1, 0); } diff --git a/mods/tinker/tconstruct/crafting/Smeltery.java b/mods/tinker/tconstruct/crafting/Smeltery.java index d9b5bfc0..8b70b20d 100644 --- a/mods/tinker/tconstruct/crafting/Smeltery.java +++ b/mods/tinker/tconstruct/crafting/Smeltery.java @@ -166,7 +166,7 @@ public class Smeltery return instance.renderIndex; } - public ArrayList getAlloyList() + public static ArrayList getAlloyList() { return instance.alloys; } diff --git a/mods/tinker/tconstruct/entity/projectile/DaggerEntity.java b/mods/tinker/tconstruct/entity/projectile/DaggerEntity.java index 324cc0bb..de11ca59 100644 --- a/mods/tinker/tconstruct/entity/projectile/DaggerEntity.java +++ b/mods/tinker/tconstruct/entity/projectile/DaggerEntity.java @@ -35,7 +35,6 @@ public class DaggerEntity extends RotatingBase { super(world, entityplayer, 0.75F, 0.8F); System.out.println("Stack: "+itemstack); - this.setEntityItemStack(itemstack); returnStackSlot = entityplayer.inventory.currentItem; returnStack = itemstack; } @@ -44,12 +43,6 @@ public class DaggerEntity extends RotatingBase { super(world, entityplayer, f, g); } - - @Override - protected void entityInit() - { - this.getDataWatcher().addObjectByDataType(10, 5); - } /*public void entityInit () { @@ -267,29 +260,4 @@ public class DaggerEntity extends RotatingBase { super.onUpdate(); }*/ - - public ItemStack getEntityItem() - { - ItemStack itemstack = this.getDataWatcher().getWatchableObjectItemStack(10); - - if (itemstack == null) - { - if (this.worldObj != null) - { - this.worldObj.getWorldLogAgent().logSevere("Dagger entity " + this.entityId + " has no item?!"); - } - - return new ItemStack(Block.stone); - } - else - { - return itemstack; - } - } - - public void setEntityItemStack(ItemStack itemstack) - { - this.getDataWatcher().updateObject(10, itemstack); - this.getDataWatcher().setObjectWatched(10); - } } diff --git a/mods/tinker/tconstruct/entity/LaunchedPotion.java b/mods/tinker/tconstruct/entity/projectile/LaunchedPotion.java similarity index 99% rename from mods/tinker/tconstruct/entity/LaunchedPotion.java rename to mods/tinker/tconstruct/entity/projectile/LaunchedPotion.java index cd8d4d81..4f297b53 100644 --- a/mods/tinker/tconstruct/entity/LaunchedPotion.java +++ b/mods/tinker/tconstruct/entity/projectile/LaunchedPotion.java @@ -1,4 +1,4 @@ -package mods.tinker.tconstruct.entity; +package mods.tinker.tconstruct.entity.projectile; import java.util.Iterator; import java.util.List; diff --git a/mods/tinker/tconstruct/entity/projectile/RotatingBase.java b/mods/tinker/tconstruct/entity/projectile/RotatingBase.java index 3769e1a9..8fa3c12e 100644 --- a/mods/tinker/tconstruct/entity/projectile/RotatingBase.java +++ b/mods/tinker/tconstruct/entity/projectile/RotatingBase.java @@ -2,6 +2,9 @@ package mods.tinker.tconstruct.entity.projectile; import java.util.List; +import com.google.common.io.ByteArrayDataInput; +import com.google.common.io.ByteArrayDataOutput; + import mods.tinker.tconstruct.library.AbilityHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; @@ -13,6 +16,7 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; +import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData; public class RotatingBase extends Entity { @@ -20,7 +24,6 @@ public class RotatingBase extends Entity public RotatingBase(World world) { super(world); - System.out.println("single constructor"); texID = 0; tex2ID = 16 * 3; returnStackSlot = -1; @@ -61,7 +64,8 @@ public class RotatingBase extends Entity setArrowHeading(motionX, motionY, motionZ, f, f1); } - protected void entityInit () + @Override + protected void entityInit() { } @@ -282,25 +286,58 @@ public class RotatingBase extends Entity } } } - - public void writeEntityToNBT (NBTTagCompound nbttagcompound) + + /*public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { - nbttagcompound.setShort("xTile", (short) xTile); - nbttagcompound.setShort("yTile", (short) yTile); - nbttagcompound.setShort("zTile", (short) zTile); - nbttagcompound.setByte("inTile", (byte) inTile); - nbttagcompound.setByte("shake", (byte) arrowShake); - nbttagcompound.setByte("inGround", (byte) (inGround ? 1 : 0)); + super.readEntityFromNBT(par1NBTTagCompound); + + if (par1NBTTagCompound.hasKey("Potion")) + { + this.potionDamage = ItemStack.loadItemStackFromNBT(par1NBTTagCompound.getCompoundTag("Potion")); + } + else + { + this.setPotionDamage(par1NBTTagCompound.getInteger("potionValue")); + } + + if (this.potionDamage == null) + { + this.setDead(); + } } - public void readEntityFromNBT (NBTTagCompound nbttagcompound) + public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { - xTile = nbttagcompound.getShort("xTile"); - yTile = nbttagcompound.getShort("yTile"); - zTile = nbttagcompound.getShort("zTile"); - inTile = nbttagcompound.getByte("inTile") & 0xff; - arrowShake = nbttagcompound.getByte("shake") & 0xff; - inGround = nbttagcompound.getByte("inGround") == 1; + super.writeEntityToNBT(par1NBTTagCompound); + + if (this.potionDamage != null) + { + + } + }*/ + + public void writeEntityToNBT (NBTTagCompound tags) + { + tags.setCompoundTag("Throwable", this.returnStack.writeToNBT(new NBTTagCompound())); + tags.setShort("xTile", (short) xTile); + tags.setShort("yTile", (short) yTile); + tags.setShort("zTile", (short) zTile); + tags.setByte("inTile", (byte) inTile); + tags.setByte("shake", (byte) arrowShake); + tags.setByte("inGround", (byte) (inGround ? 1 : 0)); + } + + public void readEntityFromNBT (NBTTagCompound tags) + { + //super.readEntityFromNBT(tags); + + this.returnStack = ItemStack.loadItemStackFromNBT(tags.getCompoundTag("Throwable")); + xTile = tags.getShort("xTile"); + yTile = tags.getShort("yTile"); + zTile = tags.getShort("zTile"); + inTile = tags.getByte("inTile") & 0xff; + arrowShake = tags.getByte("shake") & 0xff; + inGround = tags.getByte("inGround") == 1; } public void onCollideWithPlayer (EntityPlayer entityplayer) @@ -331,7 +368,16 @@ public class RotatingBase extends Entity { return 0.0F; } + + + public ItemStack getEntityItem() + { + return returnStack; + } + + public int age = 0; + public int hoverStart = 0; public int texID; public int tex2ID; public ItemStack returnStack; diff --git a/mods/tinker/tconstruct/items/FilledBucket.java b/mods/tinker/tconstruct/items/FilledBucket.java index 5130c684..13f595d4 100644 --- a/mods/tinker/tconstruct/items/FilledBucket.java +++ b/mods/tinker/tconstruct/items/FilledBucket.java @@ -28,6 +28,7 @@ public class FilledBucket extends ItemBucket //setIconIndex(224); setUnlocalizedName("tconstruct.bucket"); setContainerItem(Item.bucketEmpty); + this.setHasSubtypes(true); } public ItemStack onItemRightClick (ItemStack stack, World world, EntityPlayer player) diff --git a/mods/tinker/tconstruct/items/blocks/LiquidItemBlock.java b/mods/tinker/tconstruct/items/blocks/LiquidItemBlock.java index 19c30872..758a8d5d 100644 --- a/mods/tinker/tconstruct/items/blocks/LiquidItemBlock.java +++ b/mods/tinker/tconstruct/items/blocks/LiquidItemBlock.java @@ -7,7 +7,7 @@ import net.minecraft.util.MathHelper; public class LiquidItemBlock extends ItemBlock { public static final String blockType[] = - { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "Brass", "Manyullyn", "Alumite", "Obsidian", "Steel" }; + { "Iron", "Gold", "Copper", "Tin", "Aluminum", "Cobalt", "Ardite", "Bronze", "AluBrass", "Manyullyn", "Alumite", "Obsidian", "Steel" }; public LiquidItemBlock(int id) { diff --git a/mods/tinker/tconstruct/player/TCommonTickHandler.java b/mods/tinker/tconstruct/player/TCommonTickHandler.java deleted file mode 100644 index 7e809228..00000000 --- a/mods/tinker/tconstruct/player/TCommonTickHandler.java +++ /dev/null @@ -1,44 +0,0 @@ -package mods.tinker.tconstruct.player; - -import java.util.EnumSet; - -import net.minecraft.entity.player.EntityPlayer; -import cpw.mods.fml.common.ITickHandler; -import cpw.mods.fml.common.TickType; - -public class TCommonTickHandler implements ITickHandler -{ - int ticks = 0; - - @Override - public void tickStart (EnumSet type, Object... tickData) - { - - } - - public void tickEnd (EnumSet type, Object... tickData) - { - ticks++; - if (ticks >= 100) - { - EntityPlayer player = (EntityPlayer) tickData[0]; - int hp = player.getHealth(); - if (hp < 100 && hp >= 20) - player.setEntityHealth(hp + 1); - ticks = 0; - } - } - - @Override - public String getLabel () - { - return null; - } - - @Override - public EnumSet ticks () - { - return EnumSet.of(TickType.PLAYER); - } - -} diff --git a/mods/tinker/tconstruct/server/TProxyServer.java b/mods/tinker/tconstruct/server/TProxyServer.java deleted file mode 100644 index ec246b47..00000000 --- a/mods/tinker/tconstruct/server/TProxyServer.java +++ /dev/null @@ -1,14 +0,0 @@ -package mods.tinker.tconstruct.server; - -import mods.tinker.tconstruct.TProxyCommon; -import mods.tinker.tconstruct.player.TCommonTickHandler; -import cpw.mods.fml.common.registry.TickRegistry; -import cpw.mods.fml.relauncher.Side; - -public class TProxyServer extends TProxyCommon -{ - public void registerTickHandler() - { - //TickRegistry.registerTickHandler(new TCommonTickHandler(), Side.SERVER); - } -} diff --git a/mods/tinker/tconstruct/tools/Mattock.java b/mods/tinker/tconstruct/tools/Mattock.java index abbb2c3f..ea93d68b 100644 --- a/mods/tinker/tconstruct/tools/Mattock.java +++ b/mods/tinker/tconstruct/tools/Mattock.java @@ -42,7 +42,7 @@ public class Mattock extends DualHarvestTool return "shovel"; } - static Material[] axeMaterials = { Material.wood, Material.circuits, Material.cactus, Material.pumpkin, Material.plants }; + static Material[] axeMaterials = { Material.wood, Material.cactus, Material.pumpkin, Material.plants }; static Material[] shovelMaterials = { Material.grass, Material.ground, Material.clay }; public float getDurabilityModifier () diff --git a/mods/tinker/tconstruct/tools/PotionLauncher.java b/mods/tinker/tconstruct/tools/PotionLauncher.java index f296e6ae..b390f7fa 100644 --- a/mods/tinker/tconstruct/tools/PotionLauncher.java +++ b/mods/tinker/tconstruct/tools/PotionLauncher.java @@ -2,7 +2,7 @@ package mods.tinker.tconstruct.tools; import java.util.List; -import mods.tinker.tconstruct.entity.LaunchedPotion; +import mods.tinker.tconstruct.entity.projectile.LaunchedPotion; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity;