public void setExtraData(net.minecraft.nbt.NBTTagCompound nbttagcompound) { if (!nbttagcompound.func_74764_b("bukkit")) { nbttagcompound.func_74766_a("bukkit", new net.minecraft.nbt.NBTTagCompound()); } net.minecraft.nbt.NBTTagCompound data = nbttagcompound.func_74775_l("bukkit"); net.minecraft.entity.player.EntityPlayerMP handle = getHandle(); data.func_74768_a("newExp", handle.newExp); data.func_74768_a("newTotalExp", handle.newTotalExp); data.func_74768_a("newLevel", handle.newLevel); data.func_74768_a("expToDrop", handle.expToDrop); data.func_74757_a("keepLevel", handle.keepLevel); data.func_74772_a("firstPlayed", getFirstPlayed()); data.func_74772_a("lastPlayed", System.currentTimeMillis()); }
public void readExtraData(net.minecraft.nbt.NBTTagCompound nbttagcompound) { hasPlayedBefore = true; if (nbttagcompound.func_74764_b("bukkit")) { net.minecraft.nbt.NBTTagCompound data = nbttagcompound.func_74775_l("bukkit"); if (data.func_74764_b("firstPlayed")) { firstPlayed = data.func_74763_f("firstPlayed"); lastPlayed = data.func_74763_f("lastPlayed"); } if (data.func_74764_b("newExp")) { net.minecraft.entity.player.EntityPlayerMP handle = getHandle(); handle.newExp = data.func_74762_e("newExp"); handle.newTotalExp = data.func_74762_e("newTotalExp"); handle.newLevel = data.func_74762_e("newLevel"); handle.expToDrop = data.func_74762_e("expToDrop"); handle.keepLevel = data.func_74767_n("keepLevel"); } } }