public GuiDynamoBase(Container container, TileEntity tile, EntityPlayer player, ResourceLocation texture) { super(container, texture); baseTile = (TileDynamoBase) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(player); }
public GuiPoweredBase(Container container, TileEntity tile, EntityPlayer player, ResourceLocation texture) { super(container, texture); baseTile = (TilePowered) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(player); }
public GuiDeviceBase(Container container, TileEntity tile, EntityPlayer player, ResourceLocation texture) { super(container, texture); baseTile = (TileDeviceBase) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(player); }
private boolean doNotCollectItemsFrom(EntityPlayer player) { String name = player.getName(); UUID ownerID = owner.getId(); UUID otherID = SecurityHelper.getID(player); if (ownerID.equals(otherID)) { return ignoreOwner; } return ignoreFriends && RegistrySocial.playerHasAccess(name, owner); }
public GuiCache(InventoryPlayer inventory, TileEntity tile) { super(new ContainerCache(inventory, tile), TEXTURE); baseTile = (TileCache) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(inventory.player); generateInfo("tab.thermalexpansion.storage.cache"); }
public GuiCell(InventoryPlayer inventory, TileEntity tile) { super(new ContainerTileAugmentable(inventory, tile), TEXTURE); baseTile = (TileCell) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(inventory.player); generateInfo("tab.thermalexpansion.storage.cell"); }
public GuiTank(InventoryPlayer inventory, TileEntity tile) { super(new ContainerTileAugmentable(inventory, tile), TEXTURE); baseTile = (TileTank) tile; name = baseTile.getName(); playerName = SecurityHelper.getID(inventory.player); generateInfo("tab.thermalexpansion.storage.tank"); }
public GuiSatchelFilter(InventoryPlayer inventory, ContainerSatchelFilter container) { super(container); secure = SecurityHelper.isSecure(container.getFilterStack()); playerName = SecurityHelper.getID(inventory.player); filterIndex = ItemSatchel.getLevel(container.getFilterStack()); texture = CoreProps.TEXTURE_FILTER[filterIndex]; texturePath = texture.toString(); name = container.getInventoryName(); allowUserInput = false; xSize = 176; generateInfo("tab.thermalexpansion.storage.satchel_filter"); }
public boolean canPlayerAccess(EntityPlayer player) { if (!(this instanceof ISecurable)) { return true; } ISecurable.AccessMode access = ((ISecurable) this).getAccess(); String name = player.getName(); if (access.isPublic() || (CoreProps.enableOpSecureAccess && CoreUtils.isOp(name))) { return true; } GameProfile profile = ((ISecurable) this).getOwner(); UUID ownerID = profile.getId(); if (SecurityHelper.isDefaultUUID(ownerID)) { return true; } UUID otherID = SecurityHelper.getID(player); if (ownerID.equals(otherID)) { return true; } return access.isFriendsOnly() && RegistrySocial.playerHasAccess(name, profile); }
public GuiStrongbox(InventoryPlayer inventory, TileEntity tile) { super(new ContainerStrongbox(inventory, tile)); baseTile = (TileStrongbox) tile; playerName = SecurityHelper.getID(inventory.player); storageIndex = baseTile.getStorageIndex(); texture = CoreProps.TEXTURE_STORAGE[storageIndex]; name = baseTile.getName(); xSize = 14 + 18 * MathHelper.clamp(storageIndex, 9, 14); ySize = 112 + 18 * MathHelper.clamp(storageIndex, 2, 9); generateInfo("tab.thermalexpansion.storage.strongbox"); if (!baseTile.isCreative && baseTile.enchantHolding <= 0) { myInfo += "\n\n" + StringHelper.localize("tab.thermalexpansion.storage.enchant"); } }
public static boolean canPlayerAccess(ItemStack stack, EntityPlayer player) { if (!SecurityHelper.isSecure(stack)) { return true; } String name = player.getName(); AccessMode access = SecurityHelper.getAccess(stack); if (access.isPublic() || (CoreProps.enableOpSecureAccess && CoreUtils.isOp(name))) { return true; } GameProfile profile = SecurityHelper.getOwner(stack); UUID ownerID = profile.getId(); if (SecurityHelper.isDefaultUUID(ownerID)) { return true; } UUID otherID = SecurityHelper.getID(player); return ownerID.equals(otherID) || access.isFriendsOnly() && RegistrySocial.playerHasAccess(name, profile); }
public GuiSatchel(InventoryPlayer inventory, ContainerSatchel container) { super(container); isCreative = ItemSatchel.isCreative(container.getContainerStack()); isVoid = ItemSatchel.isVoid(container.getContainerStack()); secure = SecurityHelper.isSecure(container.getContainerStack()); playerName = SecurityHelper.getID(inventory.player); storageIndex = ItemSatchel.getStorageIndex(container.getContainerStack()); texture = CoreProps.TEXTURE_STORAGE[storageIndex]; name = container.getInventoryName(); allowUserInput = false; xSize = 14 + 18 * MathHelper.clamp(storageIndex, 9, 14); ySize = 112 + 18 * MathHelper.clamp(storageIndex, 2, 9); if (isCreative) { generateInfo("tab.thermalexpansion.storage.satchel_c"); } else if (isVoid) { generateInfo("tab.thermalexpansion.storage.satchel_v"); } else { generateInfo("tab.thermalexpansion.storage.satchel"); } if (container.getContainerStack().isItemEnchantable() && !ItemSatchel.hasHoldingEnchant(container.getContainerStack())) { myInfo += "\n\n" + StringHelper.localize("tab.thermalexpansion.storage.enchant"); } }