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

@@ -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");