diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:51:06 +0000 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2015-03-23 14:51:06 +0000 |
| commit | 6312636fd9a4d0f56dc7c9ff474a99d879bcb4e9 (patch) | |
| tree | e3279753210bfb169a00cd3f146a80baf624150e /java/darkknight/jewelrycraft/util/PlayerUtils.java | |
| parent | e86949a1ad3269ec66c9de65e2c92f5e66251411 (diff) | |
Reworked the whole repo.
Diffstat (limited to 'java/darkknight/jewelrycraft/util/PlayerUtils.java')
| -rw-r--r-- | java/darkknight/jewelrycraft/util/PlayerUtils.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/java/darkknight/jewelrycraft/util/PlayerUtils.java b/java/darkknight/jewelrycraft/util/PlayerUtils.java deleted file mode 100644 index f1655c0..0000000 --- a/java/darkknight/jewelrycraft/util/PlayerUtils.java +++ /dev/null @@ -1,38 +0,0 @@ -package darkknight.jewelrycraft.util; - -import darkknight.jewelrycraft.events.ScreenHandler; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.nbt.NBTTagCompound; - -/** - * Code taken from OpenBlocks - */ -public class PlayerUtils -{ - /** - * Returns the NBTTag of the player - * - * @param player the player - * @param modName the mod name - * @return appropriate NBTTag - */ - public static NBTTagCompound getModPlayerPersistTag(EntityPlayer player, String modName) - { - if (player.worldObj.isRemote && ScreenHandler.tagCache != null) return ScreenHandler.tagCache; - - NBTTagCompound tag = player.getEntityData(); - NBTTagCompound persistTag = null; - if (tag.hasKey(EntityPlayer.PERSISTED_NBT_TAG)) persistTag = tag.getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); - else{ - persistTag = new NBTTagCompound(); - tag.setTag(EntityPlayer.PERSISTED_NBT_TAG, persistTag); - } - NBTTagCompound modTag = null; - if (persistTag.hasKey(modName)) modTag = persistTag.getCompoundTag(modName); - else{ - modTag = new NBTTagCompound(); - persistTag.setTag(modName, modTag); - } - return modTag; - } -}
\ No newline at end of file |
