Refactoring

This commit is contained in:
WayofTime 2015-01-16 10:00:50 -05:00
parent fd330233dd
commit 56ccd3188d
76 changed files with 876 additions and 433 deletions

View file

@ -191,35 +191,35 @@ public class EnergyItems extends Item implements IBindable
public static void setItemOwner(ItemStack item, String ownerName)
{
if (item.stackTagCompound == null)
if (item.getTagCompound() == null)
{
item.setTagCompound(new NBTTagCompound());
}
item.stackTagCompound.setString("ownerName", ownerName);
item.getTagCompound().setString("ownerName", ownerName);
}
public static void checkAndSetItemOwner(ItemStack item, String ownerName)
{
if (item.stackTagCompound == null)
if (item.getTagCompound() == null)
{
item.setTagCompound(new NBTTagCompound());
}
if (item.stackTagCompound.getString("ownerName").equals(""))
if (item.getTagCompound().getString("ownerName").equals(""))
{
item.stackTagCompound.setString("ownerName", ownerName);
item.getTagCompound().setString("ownerName", ownerName);
}
}
public static String getOwnerName(ItemStack item)
{
if (item.stackTagCompound == null)
if (item.getTagCompound() == null)
{
item.setTagCompound(new NBTTagCompound());
}
return item.stackTagCompound.getString("ownerName");
return item.getTagCompound().getString("ownerName");
}
public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone)