Upload my Code Changes/Format/imports

This commit is contained in:
Alexander committed 2014-02-16 14:23:50 -05:00
1 parent 5bcdb7ca46
commit 5d4e38c0cb
264 files changed
+4014 -3972

No files matched your search

+17 -14
View File
@@ -39,7 +39,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
public BlueSlime(World world)
{
super(world);
//this.texture = "/mods/tinker/textures/mob/slimeedible.png";
// this.texture = "/mods/tinker/textures/mob/slimeedible.png";
int offset = this.rand.nextInt(299);
if (offset < 149)
offset = 1;
@@ -262,7 +262,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
{
super.readEntityFromNBT(par1NBTTagCompound);
this.setSlimeSize(par1NBTTagCompound.getInteger("Size") + 1);
//this.dataWatcher.updateObject(17, Integer.valueOf(this.health));
// this.dataWatcher.updateObject(17, Integer.valueOf(this.health));
}
/**
@@ -325,7 +325,7 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
protected void updateEntityActionState ()
{
//Minecraft.getMinecraft().getLogAgent().logInfo("Collided with "+entity.getEntityName());
// Minecraft.getMinecraft().getLogAgent().logInfo("Collided with "+entity.getEntityName());
this.despawnEntity();
EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);
@@ -485,7 +485,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
}
/**
* Indicates weather the slime is able to damage the player (based upon the slime's size)
* Indicates weather the slime is able to damage the player (based upon the
* slime's size)
*/
protected boolean canDamagePlayer ()
{
@@ -493,7 +494,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
}
/**
* Gets the amount of damage dealt to the player when "attacked" by the slime.
* Gets the amount of damage dealt to the player when "attacked" by the
* slime.
*/
protected int getAttackStrength ()
{
@@ -533,8 +535,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
}
/**
* The speed it takes to move the entityliving's rotationPitch through the faceEntity method. This is only currently
* use in wolves.
* The speed it takes to move the entityliving's rotationPitch through the
* faceEntity method. This is only currently use in wolves.
*/
public int getVerticalFaceSpeed ()
{
@@ -542,7 +544,8 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
}
/**
* Returns true if the slime makes a sound when it jumps (based upon the slime's size)
* Returns true if the slime makes a sound when it jumps (based upon the
* slime's size)
*/
protected boolean makesSoundOnJump ()
{
@@ -550,16 +553,16 @@ public class BlueSlime extends EntityLiving implements IMob, IBossDisplayData
}
/**
* Returns true if the slime makes a sound when it lands after a jump (based upon the slime's size)
* Returns true if the slime makes a sound when it lands after a jump (based
* upon the slime's size)
*/
protected boolean makesSoundOnLand ()
{
return this.getSlimeSize() > 2;
}
/*@Override
public int getBossHealth ()
{
return this.dataWatcher.getWatchableObjectInt(17);
}*/
/*
* @Override public int getBossHealth () { return
* this.dataWatcher.getWatchableObjectInt(17); }
*/
}
+124 -129
View File
@@ -119,8 +119,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
* returns if this entity triggers Block.onEntityWalking on the blocks they
* walk on. used for spiders and wolves to prevent them from trampling crops
*/
protected boolean canTriggerWalking ()
{
@@ -136,8 +136,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be
* pushable on contact, like boats or minecarts.
* Returns a boundingBox used to collide the entity with other entities and
* blocks. This enables the entity to be pushable on contact, like boats or
* minecarts.
*/
public AxisAlignedBB getCollisionBox (Entity par1Entity)
{
@@ -153,7 +154,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns true if this entity should push and be pushed by other entities when colliding.
* Returns true if this entity should push and be pushed by other entities
* when colliding.
*/
public boolean canBePushed ()
{
@@ -161,7 +163,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns the Y offset from the entity's position for any entity riding this one.
* Returns the Y offset from the entity's position for any entity riding
* this one.
*/
public double getMountedYOffset ()
{
@@ -223,7 +226,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns true if other Entities should be prevented from moving through this Entity.
* Returns true if other Entities should be prevented from moving through
* this Entity.
*/
public boolean canBeCollidedWith ()
{
@@ -279,7 +283,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Teleports the entity to another dimension. Params: Dimension number to teleport to
* Teleports the entity to another dimension. Params: Dimension number to
* teleport to
*/
public void travelToDimension (int par1)
{
@@ -325,38 +330,26 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
if (var1.getAllowNether())
{
/*
if (this.ridingEntity == null && this.timeInPortal++ >= var2)
{
this.timeInPortal = var2;
this.timeUntilPortal = this.getPortalCooldown();
byte var3;
if (this.worldObj.provider.dimensionId == -1)
{
var3 = 0;
}
else
{
var3 = -1;
}
this.travelToDimension(var3);
}
this.inPortal = false;*/
* if (this.ridingEntity == null && this.timeInPortal++ >=
* var2) { this.timeInPortal = var2; this.timeUntilPortal =
* this.getPortalCooldown(); byte var3;
*
* if (this.worldObj.provider.dimensionId == -1) { var3 = 0;
* } else { var3 = -1; }
*
* this.travelToDimension(var3); }
*
* this.inPortal = false;
*/
}
}
else
{
/*if (this.timeInPortal > 0)
{
this.timeInPortal -= 4;
}
if (this.timeInPortal < 0)
{
this.timeInPortal = 0;
}*/
/*
* if (this.timeInPortal > 0) { this.timeInPortal -= 4; }
*
* if (this.timeInPortal < 0) { this.timeInPortal = 0; }
*/
}
if (this.timeUntilPortal > 0)
@@ -468,18 +461,14 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
void moveTowardsEntity (Entity entity)
{
//TConstruct.logger.info("Moving towards entity");
/*double distX = this.posX - entity.posX;
double distZ = this.posZ - entity.posZ;
//posY = posY + 0.1;
if (entity.posY > this.posY)
motionY += 0.1;
if (distX > 0.5 && distZ > 0.5)
{
motionX = -distX;
motionZ = -distZ;
}*/
// TConstruct.logger.info("Moving towards entity");
/*
* double distX = this.posX - entity.posX; double distZ = this.posZ -
* entity.posZ; //posY = posY + 0.1;
*
* if (entity.posY > this.posY) motionY += 0.1; if (distX > 0.5 && distZ
* > 0.5) { motionX = -distX; motionZ = -distZ; }
*/
double var15 = entity.posX;
double var19 = entity.posZ;
@@ -529,28 +518,22 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
}
/*if (entity.posY > this.posY)
motionY += 0.1;*/
/*
* if (entity.posY > this.posY) motionY += 0.1;
*/
}
public double calculateDistance (double pos1, double pos2)
{
double distance = Math.abs(pos1 - pos2); //0.0D;
/*double absPos1 = Math.abs(pos1);
double absPos2 = Math.abs(pos2);
if ((pos1 <= 0.0D || pos2 <= 0.0D) && (pos1 >= 0.0D || pos2 >= 0.0D))
{
distance = absPos1 + absPos2;
}
else if (absPos1 > absPos2)
{
distance = absPos1 - absPos2;
}
else if (absPos2 > absPos1)
{
distance = absPos2 - absPos1;
}*/
double distance = Math.abs(pos1 - pos2); // 0.0D;
/*
* double absPos1 = Math.abs(pos1); double absPos2 = Math.abs(pos2);
*
* if ((pos1 <= 0.0D || pos2 <= 0.0D) && (pos1 >= 0.0D || pos2 >= 0.0D))
* { distance = absPos1 + absPos2; } else if (absPos1 > absPos2) {
* distance = absPos1 - absPos2; } else if (absPos2 > absPos1) {
* distance = absPos2 - absPos1; }
*/
return distance;
}
@@ -727,7 +710,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Applies a velocity to each of the entities pushing them away from each other. Args: entity
* Applies a velocity to each of the entities pushing them away from each
* other. Args: entity
*/
public void applyEntityCollision (Entity par1Entity)
{
@@ -839,8 +823,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
* new stack.
* Removes from an inventory slot (first arg) up to a specified number
* (second arg) of items and returns them in a new stack.
*/
public ItemStack decrStackSize (int par1, int par2)
{
@@ -873,8 +857,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
* like when you close a workbench GUI.
* When some containers are closed they call this on each slot, then drop
* whatever it returns as an EntityItem - like when you close a workbench
* GUI.
*/
public ItemStack getStackInSlotOnClosing (int par1)
{
@@ -891,7 +876,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
* Sets the given item stack to the specified slot in the inventory (can be
* crafting or armor sections).
*/
public void setInventorySlotContents (int par1, ItemStack par2ItemStack)
{
@@ -912,8 +898,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
* this more of a set than a get?*
* Returns the maximum stack size for a inventory slot. Seems to always be
* 64, possibly will be extended. *Isn't this more of a set than a get?*
*/
public int getInventoryStackLimit ()
{
@@ -928,7 +914,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
* Called when a player interacts with a mob. e.g. gets milk from a cow,
* gets into the saddle on a pig.
*/
public boolean interact (EntityPlayer player)
{
@@ -937,14 +924,14 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
if (entityFollowing == null)
{
entityFollowing = player;
//if (!worldObj.isRemote)
//player.addChatMessage("The cart is following you");
// if (!worldObj.isRemote)
// player.addChatMessage("The cart is following you");
}
else
{
entityFollowing = null;
//if (!worldObj.isRemote)
//player.addChatMessage("The cart has stopped following you");
// if (!worldObj.isRemote)
// player.addChatMessage("The cart has stopped following you");
}
return true;
}
@@ -1018,7 +1005,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Do not make give this method the name canInteractWith because it clashes with Container
* Do not make give this method the name canInteractWith because it clashes
* with Container
*/
public boolean isUseableByPlayer (EntityPlayer par1EntityPlayer)
{
@@ -1057,8 +1045,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Sets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over
* 40.
* Sets the current amount of damage the minecart has taken. Decreases over
* time. The cart breaks when this is over 40.
*/
public void setDamage (int par1)
{
@@ -1066,8 +1054,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Gets the current amount of damage the minecart has taken. Decreases over time. The cart breaks when this is over
* 40.
* Gets the current amount of damage the minecart has taken. Decreases over
* time. The cart breaks when this is over 40.
*/
public int getDamage ()
{
@@ -1095,7 +1083,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Drops the cart as a item. The exact item dropped is defined by getItemDropped().
* Drops the cart as a item. The exact item dropped is defined by
* getItemDropped().
*/
public void dropCartAsItem ()
{
@@ -1106,44 +1095,42 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Override this to define which items your cart drops when broken.
* This does not include items contained in the inventory,
* that is handled elsewhere.
* Override this to define which items your cart drops when broken. This
* does not include items contained in the inventory, that is handled
* elsewhere.
*
* @return A list of items dropped.
*/
public List<ItemStack> getItemsDropped ()
{
/*List<ItemStack> items = new ArrayList<ItemStack>();
items.add(new ItemStack(Item.minecartEmpty));
switch(cartType)
{
case 1:
items.add(new ItemStack(Block.chest));
break;
case 2:
items.add(new ItemStack(Block.stoneOvenIdle));
break;
}
return items;*/
/*
* List<ItemStack> items = new ArrayList<ItemStack>(); items.add(new
* ItemStack(Item.minecartEmpty));
*
* switch(cartType) { case 1: items.add(new ItemStack(Block.chest));
* break; case 2: items.add(new ItemStack(Block.stoneOvenIdle)); break;
* } return items;
*/
return new ArrayList<ItemStack>();
}
/**
* This function returns an ItemStack that represents this cart.
* This should be an ItemStack that can be used by the player to place the cart.
* This is the item that was registered with the cart via the registerMinecart function,
* but is not necessary the item the cart drops when destroyed.
* This function returns an ItemStack that represents this cart. This should
* be an ItemStack that can be used by the player to place the cart. This is
* the item that was registered with the cart via the registerMinecart
* function, but is not necessary the item the cart drops when destroyed.
*
* @return An ItemStack that can be used to place the cart.
*/
public ItemStack getCartItem ()
{
return null;
//return MinecartRegistry.getItemForCart(this);
// return MinecartRegistry.getItemForCart(this);
}
/**
* Returns true if this cart is self propelled.
*
* @return True if powered.
*/
public boolean isPoweredCart ()
@@ -1152,9 +1139,10 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns true if this cart is a storage cart
* Some carts may have inventories but not be storage carts
* and some carts without inventories may be storage carts.
* Returns true if this cart is a storage cart Some carts may have
* inventories but not be storage carts and some carts without inventories
* may be storage carts.
*
* @return True if this cart should be classified as a storage cart.
*/
public boolean isStorageCart ()
@@ -1164,6 +1152,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
/**
* Returns true if this cart can be ridden by an Entity.
*
* @return True if this cart can be ridden.
*/
public boolean canBeRidden ()
@@ -1176,8 +1165,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Returns true if this cart can currently use rails.
* This function is mainly used to gracefully detach a minecart from a rail.
* Returns true if this cart can currently use rails. This function is
* mainly used to gracefully detach a minecart from a rail.
*
* @return True if the minecart can use rails.
*/
public boolean canUseRail ()
@@ -1186,9 +1176,11 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Set whether the minecart can use rails.
* This function is mainly used to gracefully detach a minecart from a rail.
* @param use Whether the minecart can currently use rails.
* Set whether the minecart can use rails. This function is mainly used to
* gracefully detach a minecart from a rail.
*
* @param use
* Whether the minecart can currently use rails.
*/
public void setCanUseRail (boolean use)
{
@@ -1196,7 +1188,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Return false if this cart should not call IRail.onMinecartPass() and should ignore Powered Rails.
* Return false if this cart should not call IRail.onMinecartPass() and
* should ignore Powered Rails.
*
* @return True if this cart should call IRail.onMinecartPass().
*/
public boolean shouldDoRailFunctions ()
@@ -1206,6 +1200,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
/**
* Simply returns the minecartType variable.
*
* @return minecartType
*/
public int getCartType ()
@@ -1215,6 +1210,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
/**
* Carts should return their drag factor here
*
* @return The drag rate.
*/
protected double getDrag ()
@@ -1223,8 +1219,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Moved to allow overrides.
* This code applies drag and updates push forces.
* Moved to allow overrides. This code applies drag and updates push forces.
*/
protected void applyDragAndPushForces ()
{
@@ -1255,8 +1250,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Moved to allow overrides.
* This code updates push forces.
* Moved to allow overrides. This code updates push forces.
*/
protected void updatePushForces ()
{
@@ -1282,8 +1276,8 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Moved to allow overrides.
* This code handles minecart movement and speed capping when not on a rail.
* Moved to allow overrides. This code handles minecart movement and speed
* capping when not on a rail.
*/
protected void moveMinecartOffRail (int i, int j, int k)
{
@@ -1326,8 +1320,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
}
/**
* Moved to allow overrides.
* This code applies fuel consumption.
* Moved to allow overrides. This code applies fuel consumption.
*/
protected void updateFuel ()
{
@@ -1340,7 +1333,9 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
/**
* Moved to allow overrides, This code handle slopes affecting velocity.
* @param metadata The blocks position metadata
*
* @param metadata
* The blocks position metadata
*/
protected void adjustSlopeVelocities (int metadata)
{
@@ -1368,11 +1363,11 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
*/
/**
* Returns the carts max speed.
* Carts going faster than 1.1 cause issues with chunk loading.
* Carts cant traverse slopes or corners at greater than 0.5 - 0.6.
* This value is compared with the rails max speed to determine
* Returns the carts max speed. Carts going faster than 1.1 cause issues
* with chunk loading. Carts cant traverse slopes or corners at greater than
* 0.5 - 0.6. This value is compared with the rails max speed to determine
* the carts current max speed. A normal rails max speed is 0.4.
*
* @return Carts max speed.
*/
public float getMaxSpeedRail ()
@@ -1448,7 +1443,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
@Override
public String getInventoryName ()
{
//TODO get inventory name
// TODO get inventory name
return null;
}
+1 -1
View File
@@ -9,7 +9,7 @@ public class Crystal extends EntityCreeper
public Crystal(World par1World)
{
super(par1World);
//texture = "/mods/tinker/textures/mob/crystalwater.png";
// texture = "/mods/tinker/textures/mob/crystalwater.png";
}
}
@@ -9,13 +9,11 @@ public class CrystalGuardian extends EntityLiving
public CrystalGuardian(World par1World)
{
super(par1World);
//this.texture = "/mods/tinker/textures/mob/crystalguardamber.png";
// this.texture = "/mods/tinker/textures/mob/crystalguardamber.png";
}
/*@Override
public int getMaxHealth ()
{
return 100;
}*/
/*
* @Override public int getMaxHealth () { return 100; }
*/
}
+11 -20
View File
@@ -10,7 +10,7 @@ public class MetalSlime extends BlueSlime
public MetalSlime(World world)
{
super(world);
//this.texture = "/mods/tinker/textures/mob/slimemetal.png";
// this.texture = "/mods/tinker/textures/mob/slimemetal.png";
this.setHealth(getMaxHealthForSize());
}
@@ -40,25 +40,16 @@ public class MetalSlime extends BlueSlime
this.isDead = true;
}
/*protected void dropFewItems (boolean par1, int par2)
{
int j = this.getDropItemId();
if (j > 0)
{
int k = rand.nextInt(3) + rand.nextInt(this.getSlimeSize());
if (par2 > 0)
{
k += this.rand.nextInt(par2 + 1);
}
for (int l = 0; l < k; ++l)
{
this.dropItem(j, 1);
}
}
}*/
/*
* protected void dropFewItems (boolean par1, int par2) { int j =
* this.getDropItemId();
*
* if (j > 0) { int k = rand.nextInt(3) + rand.nextInt(this.getSlimeSize());
*
* if (par2 > 0) { k += this.rand.nextInt(par2 + 1); }
*
* for (int l = 0; l < k; ++l) { this.dropItem(j, 1); } } }
*/
protected void updateEntityActionState ()
{
+11 -16
View File
@@ -9,23 +9,18 @@ public class Skyla extends EntityCreeper
public Skyla(World par1World)
{
super(par1World);
//username = "Skyla";
//texture = "/mods/tinker/textures/mob/skyla.png";
// username = "Skyla";
// texture = "/mods/tinker/textures/mob/skyla.png";
}
/*@Override
public void sendChatToPlayer (String var1) {}
@Override
public boolean canCommandSenderUseCommand (int var1, String var2)
{
return false;
}
@Override
public ChunkCoordinates getPlayerCoordinates ()
{
return null;
}*/
/*
* @Override public void sendChatToPlayer (String var1) {}
*
* @Override public boolean canCommandSenderUseCommand (int var1, String
* var2) { return false; }
*
* @Override public ChunkCoordinates getPlayerCoordinates () { return null;
* }
*/
}
@@ -15,7 +15,8 @@ public class EntityLandmineFirework extends Entity
private int fireworkAge;
/**
* The lifetime of the firework in ticks. When the age reaches the lifetime the firework explodes.
* The lifetime of the firework in ticks. When the age reaches the lifetime
* the firework explodes.
*/
private int lifetime;
@@ -46,8 +46,8 @@ public class ExplosivePrimed extends Entity
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
* returns if this entity triggers Block.onEntityWalking on the blocks they
* walk on. used for spiders and wolves to prevent them from trampling crops
*/
protected boolean canTriggerWalking ()
{
@@ -55,7 +55,8 @@ public class ExplosivePrimed extends Entity
}
/**
* Returns true if other Entities should be prevented from moving through this Entity.
* Returns true if other Entities should be prevented from moving through
* this Entity.
*/
public boolean canBeCollidedWith ()
{
@@ -111,7 +112,7 @@ public class ExplosivePrimed extends Entity
explosion.isSmoking = true;
explosion.doExplosionA();
explosion.doExplosionB(true);
//return explosion;
// return explosion;
}
/**
@@ -291,7 +291,9 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
&& this.shootingEntity instanceof EntityPlayerMP)
{
((EntityPlayerMP) this.shootingEntity).playerNetServerHandler.sendPacket(new S2BPacketChangeGameState(6, 0));
//TConstruct.packetPipeline.sendTo(new S2BPacketChangeGameState(6, 0), (EntityPlayerMP) this.shootingEntity);
// TConstruct.packetPipeline.sendTo(new
// S2BPacketChangeGameState(6, 0),
// (EntityPlayerMP) this.shootingEntity);
}
}
@@ -425,23 +427,15 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
{
int stackSize;
/*if (par1ItemStack.isItemDamaged())
{
slotID = this.getFirstEmptyStack(living);
if (slotID >= 0)
{
living.setCurrentItemOrArmor(slotID, par1ItemStack);
living.setEquipmentDropChance(slotID, 2.0f);
par1ItemStack.stackSize = 0;
return true;
}
else
{
return false;
}
}
else*/
/*
* if (par1ItemStack.isItemDamaged()) { slotID =
* this.getFirstEmptyStack(living);
*
* if (slotID >= 0) { living.setCurrentItemOrArmor(slotID,
* par1ItemStack); living.setEquipmentDropChance(slotID, 2.0f);
* par1ItemStack.stackSize = 0; return true; } else { return
* false; } } else
*/
{
do
{
@@ -456,10 +450,12 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Adding item to inventory");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Item being added");
//TODO is this needed???
//crashreportcategory.addCrashSection("Item ID", Integer.valueOf(par1ItemStack.itemID));
// TODO is this needed???
// crashreportcategory.addCrashSection("Item ID",
// Integer.valueOf(par1ItemStack.itemID));
crashreportcategory.addCrashSection("Item data", Integer.valueOf(par1ItemStack.getItemDamage()));
//crashreportcategory.addCrashSectionCallable("Item name", new CallableItemName(this, par1ItemStack));
// crashreportcategory.addCrashSectionCallable("Item name", new
// CallableItemName(this, par1ItemStack));
throw new ReportedException(crashreport);
}
}
@@ -494,10 +490,10 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
}
else
{
/*if (this.mainInventory[k] == null)
{
this.mainInventory[k] = par1ItemStack;
}*/
/*
* if (this.mainInventory[k] == null) { this.mainInventory[k] =
* par1ItemStack; }
*/
if (living.getEquipmentInSlot(slotID) == null)
{
living.setCurrentItemOrArmor(slotID, par1ItemStack);
@@ -22,7 +22,7 @@ public class DaggerEntity extends RotatingBase
public DaggerEntity(ItemStack itemstack, World world, EntityPlayer entityplayer)
{
super(world, entityplayer, 0.75F, 0.8F);
//TConstruct.logger.info("Stack: "+itemstack);
// TConstruct.logger.info("Stack: "+itemstack);
returnStackSlot = entityplayer.inventory.currentItem;
returnStack = itemstack;
}
@@ -32,10 +32,9 @@ public class DaggerEntity extends RotatingBase
super(world, entityplayer, f, g);
}
/*public void entityInit ()
{
super.entityInit();
}*/
/*
* public void entityInit () { super.entityInit(); }
*/
@Override
public void onHit (MovingObjectPosition movingobjectposition)
@@ -80,7 +80,8 @@ public class LaunchedPotion extends EntityThrowable
}
/**
* Returns the damage value of the thrown potion that this EntityPotion represents.
* Returns the damage value of the thrown potion that this EntityPotion
* represents.
*/
public int getPotionDamage ()
{
@@ -65,16 +65,14 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
setArrowHeading(motionX, motionY, motionZ, f, f1);
}
/*public void setOnGround(boolean flag)
{
onGround = flag;
this.dataWatcher.updateObject(6, Byte.valueOf((byte) (flag == true ? 1 : 0)));
}
public boolean getOnGround()
{
return this.dataWatcher.getWatchableObjectByte(0) == 1 ? true : false;
}*/
/*
* public void setOnGround(boolean flag) { onGround = flag;
* this.dataWatcher.updateObject(6, Byte.valueOf((byte) (flag == true ? 1 :
* 0))); }
*
* public boolean getOnGround() { return
* this.dataWatcher.getWatchableObjectByte(0) == 1 ? true : false; }
*/
@Override
protected void entityInit ()
@@ -94,27 +92,17 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
worldObj.spawnParticle("snowballpoof", posX, posY, posZ, 0.0D, 0.0D, 0.0D);
}
//kill();
// kill();
}
}
/*
public void returnToPlayer()
{
damageDagger(0, true);
if(returnStack.stackSize < 1)
{
return;
}
if(returnStackSlot > 0)
{
mod_Infi2x2.forceAddToInv((EntityPlayer)returnsTo, returnStack, returnStackSlot, true);
} else
{
mod_Infi2x2.addToInv((EntityPlayer)returnsTo, returnStack, true);
}
}
*/
* public void returnToPlayer() { damageDagger(0, true);
* if(returnStack.stackSize < 1) { return; } if(returnStackSlot > 0) {
* mod_Infi2x2.forceAddToInv((EntityPlayer)returnsTo, returnStack,
* returnStackSlot, true); } else {
* mod_Infi2x2.addToInv((EntityPlayer)returnsTo, returnStack, true); } }
*/
public void determineRotation ()
{
@@ -190,18 +178,13 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
}
else
{
/*this.motionX = 0;
this.motionY = 0;
this.motionZ = 0;*/
/*ticksInGround++;
if (ticksInGround == 1200)
{
setDead();
}
if (ticksInGround == maxGroundTicks)
{
setDead();
}*/
/*
* this.motionX = 0; this.motionY = 0; this.motionZ = 0;
*/
/*
* ticksInGround++; if (ticksInGround == 1200) { setDead(); } if
* (ticksInGround == maxGroundTicks) { setDead(); }
*/
if (!hasHitGround)
{
hasHitGround = true;
@@ -303,34 +286,24 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
}
}
/*public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
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 writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
if (this.potionDamage != null)
{
}
}*/
/*
* public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
* 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 writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
* super.writeEntityToNBT(par1NBTTagCompound);
*
* if (this.potionDamage != null) {
*
* } }
*/
public void writeEntityToNBT (NBTTagCompound tags)
{
@@ -346,14 +319,14 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
public void readEntityFromNBT (NBTTagCompound tags)
{
//super.readEntityFromNBT(tags);
// super.readEntityFromNBT(tags);
this.returnStack = ItemStack.loadItemStackFromNBT(tags.getCompoundTag("Throwable"));
xTile = tags.getShort("xTile");
yTile = tags.getShort("yTile");
zTile = tags.getShort("zTile");
//TODO fix this\/
//inTile = tags.getString("inTile");
// TODO fix this\/
// inTile = tags.getString("inTile");
arrowShake = tags.getByte("shake") & 0xff;
onGround = tags.getByte("onGround") == 1;
doNotRetrieve = tags.getBoolean("Retrieval");