2014-03-26 20:34:47 +00:00
|
|
|
From 6a400f05f432135d7bf5c641d55f113c97b610f9 Mon Sep 17 00:00:00 2001
|
2013-12-21 23:00:13 +00:00
|
|
|
From: DerFlash <bte@freenet.de>
|
|
|
|
Date: Tue, 9 Jul 2013 00:11:12 +0200
|
|
|
|
Subject: [PATCH] Save ticks lived to nbttag
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2014-03-26 20:34:47 +00:00
|
|
|
index b13968d..27b0a25 100644
|
2013-12-21 23:00:13 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2014-01-31 20:42:29 +00:00
|
|
|
@@ -1132,6 +1132,7 @@ public abstract class Entity {
|
2013-12-21 23:00:13 +00:00
|
|
|
nbttagcompound.setLong("WorldUUIDLeast", this.world.getDataManager().getUUID().getLeastSignificantBits());
|
|
|
|
nbttagcompound.setLong("WorldUUIDMost", this.world.getDataManager().getUUID().getMostSignificantBits());
|
|
|
|
nbttagcompound.setInt("Bukkit.updateLevel", CURRENT_LEVEL);
|
|
|
|
+ nbttagcompound.setInt("Spigot.ticksLived", this.ticksLived);
|
|
|
|
// CraftBukkit end
|
|
|
|
this.b(nbttagcompound);
|
|
|
|
if (this.vehicle != null) {
|
2014-01-31 20:42:29 +00:00
|
|
|
@@ -1200,6 +1201,8 @@ public abstract class Entity {
|
2013-12-21 23:00:13 +00:00
|
|
|
if (this instanceof EntityLiving) {
|
|
|
|
EntityLiving entity = (EntityLiving) this;
|
|
|
|
|
|
|
|
+ this.ticksLived = nbttagcompound.getInt("Spigot.ticksLived");
|
|
|
|
+
|
|
|
|
// Reset the persistence for tamed animals
|
|
|
|
if (entity instanceof EntityTameableAnimal && !isLevelAtLeast(nbttagcompound, 2) && !nbttagcompound.getBoolean("PersistenceRequired")) {
|
|
|
|
EntityInsentient entityinsentient = (EntityInsentient) entity;
|
|
|
|
--
|
2014-03-26 20:34:47 +00:00
|
|
|
1.8.5.2.msysgit.0
|
2013-12-21 23:00:13 +00:00
|
|
|
|