1
0
forked from xjboss/KCauldronX

Rollback to the state of .152 build with some critical fixes and updates

This commit is contained in:
Sergey Shatunov
2016-01-04 12:38:37 +07:00
parent 40c95e49c0
commit f722fccdce
38 changed files with 406 additions and 1452 deletions

View File

@ -80,7 +80,7 @@
private static final String __OBFID = "CL_00001533";
/** Forge: Used to store custom data for each entity. */
private NBTTagCompound customEntityData;
@@ -135,7 +175,17 @@
@@ -135,7 +175,16 @@
public ArrayList<EntityItem> capturedDrops = new ArrayList<EntityItem>();
private UUID persistentID;
@ -94,11 +94,10 @@
+ // Spigot end
protected HashMap<String, IExtendedEntityProperties> extendedProperties;
+ public String spawnReason; // Cauldron - used to handle CraftBukkit's SpawnReason with CustomSpawners
+ public boolean markedForRemoval = false;
public int getEntityId()
{
@@ -159,7 +209,7 @@
@@ -159,7 +208,7 @@
this.rand = new Random();
this.fireResistance = 1;
this.firstUpdate = true;
@ -107,7 +106,7 @@
this.myEntitySize = Entity.EnumEntitySize.SIZE_2;
this.worldObj = p_i1582_1_;
this.setPosition(0.0D, 0.0D, 0.0D);
@@ -167,8 +217,15 @@
@@ -167,8 +216,15 @@
if (p_i1582_1_ != null)
{
this.dimension = p_i1582_1_.provider.dimensionId;
@ -123,7 +122,7 @@
this.dataWatcher = new DataWatcher(this);
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
@@ -277,6 +334,41 @@
@@ -277,6 +333,41 @@
protected void setRotation(float p_70101_1_, float p_70101_2_)
{
@ -165,7 +164,7 @@
this.rotationYaw = p_70101_1_ % 360.0F;
this.rotationPitch = p_70101_2_ % 360.0F;
}
@@ -343,7 +435,7 @@
@@ -343,7 +434,7 @@
if (this.inPortal)
{
@ -174,7 +173,7 @@
{
if (this.ridingEntity == null && this.portalCounter++ >= i)
{
@@ -457,7 +549,35 @@
@@ -457,7 +548,35 @@
{
if (!this.isImmuneToFire)
{
@ -211,7 +210,7 @@
this.setFire(15);
}
}
@@ -492,6 +612,30 @@
@@ -492,6 +611,30 @@
public void moveEntity(double p_70091_1_, double p_70091_3_, double p_70091_5_)
{
@ -242,7 +241,7 @@
if (this.noClip)
{
this.boundingBox.offset(p_70091_1_, p_70091_3_, p_70091_5_);
@@ -756,6 +900,34 @@
@@ -756,6 +899,34 @@
d10 = this.posY - d4;
d11 = this.posZ - d5;
@ -277,7 +276,7 @@
if (this.canTriggerWalking() && !flag && this.ridingEntity == null)
{
int j1 = MathHelper.floor_double(this.posX);
@@ -798,6 +970,8 @@
@@ -798,6 +969,8 @@
}
}
@ -286,7 +285,7 @@
try
{
this.func_145775_I();
@@ -809,7 +983,8 @@
@@ -809,7 +982,8 @@
this.addEntityCrashInfo(crashreportcategory);
throw new ReportedException(crashreport);
}
@ -296,7 +295,7 @@
boolean flag2 = this.isWet();
if (this.worldObj.func_147470_e(this.boundingBox.contract(0.001D, 0.001D, 0.001D)))
@@ -820,8 +995,20 @@
@@ -820,8 +994,20 @@
{
++this.fire;
@ -318,7 +317,7 @@
this.setFire(8);
}
}
@@ -839,6 +1026,8 @@
@@ -839,6 +1025,8 @@
this.worldObj.theProfiler.endSection();
}
@ -327,7 +326,7 @@
}
protected String getSwimSound()
@@ -867,7 +1056,18 @@
@@ -867,7 +1055,18 @@
try
{
@ -347,7 +346,7 @@
}
catch (Throwable throwable)
{
@@ -928,6 +1128,7 @@
@@ -928,6 +1127,7 @@
return null;
}
@ -355,7 +354,7 @@
protected void dealFireDamage(int p_70081_1_)
{
if (!this.isImmuneToFire)
@@ -935,7 +1136,16 @@
@@ -935,7 +1135,16 @@
this.attackEntityFrom(DamageSource.inFire, (float)p_70081_1_);
}
}
@ -372,7 +371,7 @@
public final boolean isImmuneToFire()
{
return this.isImmuneToFire;
@@ -1184,6 +1394,8 @@
@@ -1184,6 +1393,8 @@
public void onCollideWithPlayer(EntityPlayer p_70100_1_) {}
@ -381,7 +380,7 @@
public void applyEntityCollision(Entity p_70108_1_)
{
if (p_70108_1_.riddenByEntity != this && p_70108_1_.ridingEntity != this)
@@ -1310,6 +1522,20 @@
@@ -1310,6 +1521,20 @@
{
p_70109_1_.setTag("Pos", this.newDoubleNBTList(new double[] {this.posX, this.posY + (double)this.ySize, this.posZ}));
p_70109_1_.setTag("Motion", this.newDoubleNBTList(new double[] {this.motionX, this.motionY, this.motionZ}));
@ -402,7 +401,7 @@
p_70109_1_.setTag("Rotation", this.newFloatNBTList(new float[] {this.rotationYaw, this.rotationPitch}));
p_70109_1_.setFloat("FallDistance", this.fallDistance);
p_70109_1_.setShort("Fire", (short)this.fire);
@@ -1320,6 +1546,12 @@
@@ -1320,6 +1545,12 @@
p_70109_1_.setInteger("PortalCooldown", this.timeUntilPortal);
p_70109_1_.setLong("UUIDMost", this.getUniqueID().getMostSignificantBits());
p_70109_1_.setLong("UUIDLeast", this.getUniqueID().getLeastSignificantBits());
@ -415,7 +414,7 @@
if (customEntityData != null)
{
p_70109_1_.setTag("ForgeData", customEntityData);
@@ -1370,7 +1602,7 @@
@@ -1370,7 +1601,7 @@
this.motionX = nbttaglist1.func_150309_d(0);
this.motionY = nbttaglist1.func_150309_d(1);
this.motionZ = nbttaglist1.func_150309_d(2);
@ -424,7 +423,7 @@
if (Math.abs(this.motionX) > 10.0D)
{
this.motionX = 0.0D;
@@ -1385,7 +1617,7 @@
@@ -1385,7 +1616,7 @@
{
this.motionZ = 0.0D;
}
@ -433,7 +432,7 @@
this.prevPosX = this.lastTickPosX = this.posX = nbttaglist.func_150309_d(0);
this.prevPosY = this.lastTickPosY = this.posY = nbttaglist.func_150309_d(1);
this.prevPosZ = this.lastTickPosZ = this.posZ = nbttaglist.func_150309_d(2);
@@ -1436,6 +1668,76 @@
@@ -1436,6 +1667,76 @@
{
this.setPosition(this.posX, this.posY, this.posZ);
}
@ -510,7 +509,7 @@
}
catch (Throwable throwable)
{
@@ -1653,6 +1955,31 @@
@@ -1653,6 +1954,31 @@
public void mountEntity(Entity p_70078_1_)
{
@ -542,7 +541,7 @@
this.entityRiderPitchDelta = 0.0D;
this.entityRiderYawDelta = 0.0D;
@@ -1660,6 +1987,20 @@
@@ -1660,6 +1986,20 @@
{
if (this.ridingEntity != null)
{
@ -563,7 +562,7 @@
this.setLocationAndAngles(this.ridingEntity.posX, this.ridingEntity.boundingBox.minY + (double)this.ridingEntity.height, this.ridingEntity.posZ, this.rotationYaw, this.rotationPitch);
this.ridingEntity.riddenByEntity = null;
}
@@ -1668,22 +2009,61 @@
@@ -1668,22 +2008,61 @@
}
else
{
@ -632,7 +631,7 @@
this.ridingEntity = p_70078_1_;
p_70078_1_.riddenByEntity = this;
}
@@ -1860,12 +2240,59 @@
@@ -1860,12 +2239,59 @@
public void onStruckByLightning(EntityLightningBolt p_70077_1_)
{
@ -694,7 +693,7 @@
}
}
@@ -2038,36 +2465,62 @@
@@ -2038,36 +2464,62 @@
{
this.worldObj.theProfiler.startSection("changeDimension");
MinecraftServer minecraftserver = MinecraftServer.getServer();
@ -773,7 +772,7 @@
}
this.isDead = true;
@@ -2077,7 +2530,6 @@
@@ -2077,7 +2529,6 @@
this.worldObj.theProfiler.endSection();
}
}
@ -781,7 +780,7 @@
public float func_145772_a(Explosion p_145772_1_, World p_145772_2_, int p_145772_3_, int p_145772_4_, int p_145772_5_, Block p_145772_6_)
{
return p_145772_6_.getExplosionResistance(this, p_145772_2_, p_145772_3_, p_145772_4_, p_145772_5_, posX, posY + getEyeHeight(), posZ);
@@ -2474,4 +2926,14 @@
@@ -2474,4 +2925,14 @@
}
}
}