mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Fix compile errors from merge
This commit is contained in:
1 parent
0cb18773aa
commit
8064beb0fc
57 files changed
+270
-315
No files matched your search
@@ -193,7 +193,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
{
|
||||
if(hasSecurity(itemstack))
|
||||
{
|
||||
list.add(SecurityUtils.getOwnerDisplay(entityplayer.getCommandSenderName(), getOwner(itemstack)));
|
||||
list.add(SecurityUtils.getOwnerDisplay(entityplayer.getName(), getOwner(itemstack)));
|
||||
list.add(EnumColor.GREY + LangUtils.localize("gui.security") + ": " + SecurityUtils.getSecurityDisplay(itemstack));
|
||||
|
||||
if(SecurityUtils.isOverridden(itemstack))
|
||||
@@ -317,7 +317,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
|
||||
if(getOwner(stack) == null)
|
||||
{
|
||||
security.getSecurity().setOwner(player.getCommandSenderName());
|
||||
security.getSecurity().setOwner(player.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean tryPlaceContainedLiquid(World world, ItemStack itemstack, int x, int y, int z)
|
||||
public boolean tryPlaceContainedLiquid(World world, ItemStack itemstack, BlockPos pos)
|
||||
{
|
||||
if(getFluidStack(itemstack) == null || !getFluidStack(itemstack).getFluid().canBePlacedInWorld())
|
||||
{
|
||||
@@ -466,7 +466,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
{
|
||||
if(getOwner(itemstack) == null)
|
||||
{
|
||||
setOwner(itemstack, entityplayer.getCommandSenderName());
|
||||
setOwner(itemstack, entityplayer.getName());
|
||||
}
|
||||
|
||||
if(SecurityUtils.canAccess(entityplayer, itemstack))
|
||||
@@ -915,9 +915,9 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
@Override
|
||||
public String getOwner(ItemStack stack)
|
||||
{
|
||||
if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("owner"))
|
||||
if(stack.hasTagCompound() && stack.getTagCompound().hasKey("owner"))
|
||||
{
|
||||
return stack.stackTagCompound.getString("owner");
|
||||
return stack.getTagCompound().getString("owner");
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -926,40 +926,40 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
@Override
|
||||
public void setOwner(ItemStack stack, String owner)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if(owner == null || owner.isEmpty())
|
||||
{
|
||||
stack.stackTagCompound.removeTag("owner");
|
||||
stack.getTagCompound().removeTag("owner");
|
||||
return;
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setString("owner", owner);
|
||||
stack.getTagCompound().setString("owner", owner);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecurityMode getSecurity(ItemStack stack)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(stack.getTagCompound() == null)
|
||||
{
|
||||
return SecurityMode.PUBLIC;
|
||||
}
|
||||
|
||||
return SecurityMode.values()[stack.stackTagCompound.getInteger("security")];
|
||||
return SecurityMode.values()[stack.getTagCompound().getInteger("security")];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSecurity(ItemStack stack, SecurityMode mode)
|
||||
{
|
||||
if(stack.stackTagCompound == null)
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
stack.stackTagCompound.setInteger("security", mode.ordinal());
|
||||
stack.getTagCompound().setInteger("security", mode.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user