66b3c827cc
Removed all code that was marked as deprecated, IE: ICustomItemRenderer, and the functions in Configuration
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
--- ../src_base/minecraft_server/net/minecraft/src/Entity.java 0000-00-00 00:00:00.000000000 -0000
|
|
+++ ../src_work/minecraft_server/net/minecraft/src/Entity.java 0000-00-00 00:00:00.000000000 -0000
|
|
@@ -165,6 +165,9 @@
|
|
public boolean ignoreFrustumCheck;
|
|
public boolean isAirBorne;
|
|
|
|
+ /** Forge: Used to store custom data for each entity. */
|
|
+ private NBTTagCompound customEntityData;
|
|
+
|
|
public Entity(World par1World)
|
|
{
|
|
this.entityId = nextEntityID++;
|
|
@@ -206,6 +209,29 @@
|
|
|
|
protected abstract void entityInit();
|
|
|
|
+ /**
|
|
+ * Returns a NBTTagCompound that can be used to store custom data for this entity.
|
|
+ * It will be written, and read from disc, so it persists over world saves.
|
|
+ * @return A NBTTagCompound
|
|
+ */
|
|
+ public NBTTagCompound getEntityData()
|
|
+ {
|
|
+ if (customEntityData == null)
|
|
+ {
|
|
+ customEntityData = new NBTTagCompound();
|
|
+ }
|
|
+ return customEntityData;
|
|
+ }
|
|
+
|
|
+ /**
|
|
+ * Used in model rendering to determine if the entity riding this entity should be in the 'sitting' position.
|
|
+ * @return false to prevent an entity that is mounted to this entity from displaying the 'sitting' animation.
|
|
+ */
|
|
+ public boolean shouldRiderSit()
|
|
+ {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
public DataWatcher getDataWatcher()
|
|
{
|
|
return this.dataWatcher;
|
|
@@ -1215,6 +1241,10 @@
|
|
par1NBTTagCompound.setShort("Fire", (short)this.fire);
|
|
par1NBTTagCompound.setShort("Air", (short)this.getAir());
|
|
par1NBTTagCompound.setBoolean("OnGround", this.onGround);
|
|
+ if (customEntityData != null)
|
|
+ {
|
|
+ par1NBTTagCompound.setCompoundTag("ForgeData", customEntityData);
|
|
+ }
|
|
this.writeEntityToNBT(par1NBTTagCompound);
|
|
}
|
|
|
|
@@ -1256,6 +1286,10 @@
|
|
this.onGround = par1NBTTagCompound.getBoolean("OnGround");
|
|
this.setPosition(this.posX, this.posY, this.posZ);
|
|
this.setRotation(this.rotationYaw, this.rotationPitch);
|
|
+ if (par1NBTTagCompound.hasKey("ForgeData"))
|
|
+ {
|
|
+ customEntityData = par1NBTTagCompound.getCompoundTag("ForgeData");
|
|
+ }
|
|
this.readEntityFromNBT(par1NBTTagCompound);
|
|
}
|
|
|