work on entites

This commit is contained in:
Progwml6 committed 2014-01-21 18:01:00 -05:00
1 parent 780e933985
commit 1f0ab2b74a
16 files changed
+63 -53

No files matched your search

@@ -101,7 +101,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
this.prevRotationPitch = this.rotationPitch = (float) (Math.atan2(this.motionY, (double) f) * 180.0D / Math.PI);
}
Block i = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
Block i = this.worldObj.func_147439_a(this.field_145791_d, this.field_145792_e, this.field_145789_f);
i.func_149719_a(this.worldObj, this.field_145791_d, this.field_145792_e, this.field_145789_f);
@@ -121,7 +121,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
{
if (!worldObj.isRemote)
{
Block j = this.worldObj.getBlock(this.field_145791_d, this.field_145792_e, this.field_145789_f);
Block j = this.worldObj.func_147439_a(this.field_145791_d, this.field_145792_e, this.field_145789_f);
int k = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
if (j == this.inTile && k == this.inData)
@@ -329,7 +329,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
this.field_145791_d = movingobjectposition.blockX;
this.field_145792_e = movingobjectposition.blockY;
this.field_145789_f = movingobjectposition.blockZ;
this.inTile = this.worldObj.getBlockId(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.inTile = this.worldObj.func_147439_a(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.inData = this.worldObj.getBlockMetadata(this.field_145791_d, this.field_145792_e, this.field_145789_f);
this.motionX = (double) ((float) (movingobjectposition.hitVec.xCoord - this.posX));
this.motionY = (double) ((float) (movingobjectposition.hitVec.yCoord - this.posY));
@@ -64,7 +64,7 @@ public class DaggerEntity extends RotatingBase
xTile = movingobjectposition.blockX;
yTile = movingobjectposition.blockY;
zTile = movingobjectposition.blockZ;
inTile = worldObj.getBlockId(xTile, yTile, zTile);
inTile = worldObj.func_147439_a(xTile, yTile, zTile);
motionX = (float) (movingobjectposition.hitVec.xCoord - posX);
motionY = (float) (movingobjectposition.hitVec.yCoord - posY);
motionZ = (float) (movingobjectposition.hitVec.zCoord - posZ);
@@ -5,6 +5,7 @@ import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -30,7 +31,7 @@ public class LaunchedPotion extends EntityThrowable
public LaunchedPotion(World par1World, EntityLivingBase par2EntityLiving, int par3)
{
this(par1World, par2EntityLiving, new ItemStack(Item.potion, 1, par3));
this(par1World, par2EntityLiving, new ItemStack(Items.potionitem, 1, par3));
}
public LaunchedPotion(World par1World, EntityLivingBase par2EntityLiving, ItemStack par3ItemStack)
@@ -42,7 +43,7 @@ public class LaunchedPotion extends EntityThrowable
@SideOnly(Side.CLIENT)
public LaunchedPotion(World par1World, double par2, double par4, double par6, int par8)
{
this(par1World, par2, par4, par6, new ItemStack(Item.potion, 1, par8));
this(par1World, par2, par4, par6, new ItemStack(Items.potionitem, 1, par8));
}
public LaunchedPotion(World par1World, double par2, double par4, double par6, ItemStack par8ItemStack)
@@ -73,7 +74,7 @@ public class LaunchedPotion extends EntityThrowable
{
if (this.potionDamage == null)
{
this.potionDamage = new ItemStack(Item.potion, 1, 0);
this.potionDamage = new ItemStack(Items.potionitem, 1, 0);
}
this.potionDamage.setItemDamage(par1);
@@ -86,7 +87,7 @@ public class LaunchedPotion extends EntityThrowable
{
if (this.potionDamage == null)
{
this.potionDamage = new ItemStack(Item.potion, 1, 0);
this.potionDamage = new ItemStack(Items.potionitem, 1, 0);
}
return this.potionDamage.getItemDamage();
@@ -99,7 +100,7 @@ public class LaunchedPotion extends EntityThrowable
{
if (!this.worldObj.isRemote)
{
List list = Item.potion.getEffects(this.potionDamage);
List list = Items.potionitem.getEffects(this.potionDamage);
if (list != null && !list.isEmpty())
{
@@ -5,8 +5,10 @@ import io.netty.buffer.ByteBuf;
import java.util.List;
import tconstruct.library.tools.AbilityHelper;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
@@ -36,7 +38,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
xTile = -1;
yTile = -1;
zTile = -1;
inTile = 0;
inTile = Blocks.air;
onGround = false;
arrowShake = 0;
ticksInAir = 0;
@@ -179,7 +181,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
}
if (onGround)
{
int i = worldObj.getBlockId(xTile, yTile, zTile);
Block i = worldObj.func_147439_a(xTile, yTile, zTile);
if (i != inTile)
{
onGround = false;
@@ -410,7 +412,7 @@ public class RotatingBase extends Entity implements IEntityAdditionalSpawnData
protected int xTile;
protected int yTile;
protected int zTile;
protected int inTile;
protected Block inTile;
public int arrowShake;
public EntityPlayer owner;
protected int ticksInGround;