From 1dbebb459319ee5ed698d788d70b09dd0bda1e34 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 4 Dec 2011 12:16:15 +0000 Subject: [PATCH] Fixed exp resetting upon teleporting cross-world (fixes BUKKIT-46. Again.) --- src/main/java/net/minecraft/server/EntityPlayer.java | 2 +- .../java/net/minecraft/server/ServerConfigurationManager.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index a84a6f4f35..013dfe9707 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -27,7 +27,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int cc = -99999999; private int cd = -99999999; private boolean ce = true; - private int cf = -99999999; + public int cf = -99999999; // Craftbukkit - priv to pub - "lastSentExp" private int cg = 60; private ItemStack[] ch = new ItemStack[] { null, null, null, null, null}; private int ci = 0; diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index ad1c702c99..80013324d4 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -703,6 +703,7 @@ public class ServerConfigurationManager { public void updateClient(EntityPlayer entityplayer) { entityplayer.updateInventory(entityplayer.defaultContainer); entityplayer.s_(); + entityplayer.cf = -1; // CraftBukkit added } public int getPlayerCount() {