mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
19972e09b8
5a0150f586ed3eb15fe6f1f596d1a5a7d806f0f9 Fix ITEM_BREAK e6a3911057bd94d8bd7021cbb4923fb84fb106d1 Upstream merge d1cdcf8d4c3639f956474f02ed662517cffbe23e Remove old patch 068df64aeee368377e1673667bffc7a6dcf90554 Rebuild all patches
30 lines
1.6 KiB
Diff
30 lines
1.6 KiB
Diff
From c23721d38a84ae8cfbdae9374b4640409979aad4 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index afa789f..1755da2 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -1199,6 +1199,7 @@ public abstract class Entity implements ICommandListener {
|
|
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
|
|
if (this.getCustomName() != null && this.getCustomName().length() > 0) {
|
|
nbttagcompound.setString("CustomName", this.getCustomName());
|
|
@@ -1286,6 +1287,8 @@ public abstract class Entity implements ICommandListener {
|
|
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;
|
|
--
|
|
2.1.0
|
|
|