Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/CraftBukkit-Patches/0072-Save-ticks-lived-to-nbttag.patch

31 Zeilen
1.5 KiB
Diff

2014-06-22 11:25:10 +02:00
From 19d109674e896c40fd689fb4824f1391ffecf676 Mon Sep 17 00:00:00 2001
2014-04-12 06:18:37 +02: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-06-22 11:25:10 +02:00
index 2a192e1..409b0ad 100644
2014-04-12 06:18:37 +02:00
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
2014-04-18 19:08:19 +02:00
@@ -1134,6 +1134,7 @@ public abstract class Entity {
2014-04-12 06:18:37 +02: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-04-18 19:08:19 +02:00
@@ -1202,6 +1203,8 @@ public abstract class Entity {
2014-04-12 06:18:37 +02: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-04-18 19:08:19 +02:00
1.9.1
2014-04-12 06:18:37 +02:00