Java Code Examples for net.minecraft.entity.player.EntityPlayer#getCurrentEquippedItem()
The following examples show how to use
net.minecraft.entity.player.EntityPlayer#getCurrentEquippedItem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FluidUtils.java From CodeChickenCore with MIT License | 6 votes |
public static boolean emptyTankIntoContainer(IFluidHandler tank, EntityPlayer player, FluidStack tankLiquid) { ItemStack stack = player.getCurrentEquippedItem(); if (!FluidContainerRegistry.isEmptyContainer(stack)) return false; ItemStack filled = FluidContainerRegistry.fillFluidContainer(tankLiquid, stack); FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(filled); if (liquid == null || filled == null) return false; tank.drain(null, liquid.amount, true); if (!player.capabilities.isCreativeMode) { if (stack.stackSize == 1) player.inventory.setInventorySlotContents(player.inventory.currentItem, filled); else if (player.inventory.addItemStackToInventory(filled)) stack.stackSize--; else return false; } player.inventoryContainer.detectAndSendChanges(); return true; }
Example 2
Source File: EntityDrone.java From PneumaticCraft with GNU General Public License v3.0 | 6 votes |
@Override public boolean interact(EntityPlayer player){ ItemStack equippedItem = player.getCurrentEquippedItem(); if(!worldObj.isRemote && equippedItem != null) { if(equippedItem.getItem() == Itemss.GPSTool) { ChunkPosition gpsLoc = ItemGPSTool.getGPSLocation(equippedItem); if(gpsLoc != null) { getNavigator().tryMoveToXYZ(gpsLoc.chunkPosX, gpsLoc.chunkPosY, gpsLoc.chunkPosZ, 0.1D); } } else { int dyeIndex = TileEntityPlasticMixer.getDyeIndex(equippedItem); if(dyeIndex >= 0) { setDroneColor(ItemDye.field_150922_c[dyeIndex]); equippedItem.stackSize--; if(equippedItem.stackSize <= 0) { player.setCurrentItemOrArmor(0, null); } } } } return false; }
Example 3
Source File: FluidUtils.java From CodeChickenCore with MIT License | 6 votes |
public static boolean fillTankWithContainer(IFluidHandler tank, EntityPlayer player) { ItemStack stack = player.getCurrentEquippedItem(); FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(stack); if (liquid == null) return false; if (tank.fill(null, liquid, false) != liquid.amount && !player.capabilities.isCreativeMode) return false; tank.fill(null, liquid, true); if (!player.capabilities.isCreativeMode) InventoryUtils.consumeItem(player.inventory, player.inventory.currentItem); player.inventoryContainer.detectAndSendChanges(); return true; }
Example 4
Source File: BlockMBCreativePart.java From BigReactors with MIT License | 6 votes |
@Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { if(player.isSneaking()) { return false; } ItemStack currentEquippedItem = player.getCurrentEquippedItem(); TileEntity te = world.getTileEntity(x, y, z); if(te instanceof TileEntityReactorCreativeCoolantPort) { TileEntityReactorCreativeCoolantPort cp = (TileEntityReactorCreativeCoolantPort)te; if(currentEquippedItem == null || StaticUtils.Inventory.isPlayerHoldingWrench(player)) { // Use wrench to change inlet/outlet state cp.setInlet(!cp.isInlet(), true); } else { cp.forceAddWater(); } return true; } return false; }
Example 5
Source File: BlockCoordTransporter.java From ModdingTutorials with GNU General Public License v2.0 | 6 votes |
@Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) { ItemStack stack = playerIn.getCurrentEquippedItem(); if(stack != null) { if(stack.getItem() instanceof ItemCoordinateCache) { if(stack.getItem().hasEffect(stack)) { TileEntityCoordTransporter tect = (TileEntityCoordTransporter) worldIn.getTileEntity(pos); stack.stackSize--; playerIn.addChatMessage(new ChatComponentText("Added cordinate cache to tile entity")); } } } return true; }
Example 6
Source File: ModEnchantments.java From Et-Futurum with The Unlicense | 5 votes |
public static void onPlayerPickupXP(PlayerPickupXpEvent event) { EntityPlayer player = event.entityPlayer; EntityXPOrb orb = event.orb; if (player.worldObj.isRemote) return; if (!EtFuturum.enableMending) return; ItemStack[] stacks = new ItemStack[5]; stacks[0] = player.getCurrentEquippedItem(); // held stacks[1] = player.getEquipmentInSlot(1); // boots stacks[2] = player.getEquipmentInSlot(2); // leggings stacks[3] = player.getEquipmentInSlot(3); // chestplate stacks[4] = player.getEquipmentInSlot(4); // helmet for (ItemStack stack : stacks) if (stack != null && stack.getItemDamage() > 0 && EnchantmentHelper.getEnchantmentLevel(mending.effectId, stack) > 0) { int xp = orb.xpValue; while (xp > 0 && stack.getItemDamage() > 0) { stack.setItemDamage(stack.getItemDamage() - 2); xp--; } if (xp <= 0) { orb.setDead(); event.setCanceled(true); return; } } }
Example 7
Source File: IntegrationThaumicHorizions.java From Gadomancy with GNU Lesser General Public License v3.0 | 5 votes |
@SubscribeEvent(priority = EventPriority.LOWEST) public void on(AttackEntityEvent e) { EntityPlayer player = e.entityPlayer; if(!e.target.worldObj.isRemote && e.target instanceof EntityGolemTH && player.isSneaking()) { e.setCanceled(true); ItemStack stack = player.getCurrentEquippedItem(); if (stack != null && stack.getItem().onLeftClickEntity(stack, player, e.target) && e.target.isDead) { CommonProxy.EVENT_HANDLER_GOLEM.on(new PlaySoundAtEntityEvent(e.target, "thaumcraft:zap", 0.5f, 1.0f)); } } }
Example 8
Source File: ContainerAmadron.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public boolean canInteractWith(EntityPlayer player){ if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Itemss.amadronTablet) { IPressurizable pressurizable = (IPressurizable)Itemss.amadronTablet; pressurizable.addAir(player.getCurrentEquippedItem(), -1); if(pressurizable.getPressure(player.getCurrentEquippedItem()) > 0) return true; else { player.addChatMessage(new ChatComponentTranslation("gui.tab.problems.notEnoughPressure")); } } return false; }
Example 9
Source File: BlockEndCake.java From Ex-Aliquo with MIT License | 5 votes |
@Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { int meta = world.getBlockMetadata(x, y, z) - 1; ItemStack item = player.getCurrentEquippedItem(); if (player.capabilities.isCreativeMode) { if (item != null && item.getItem() == Item.eyeOfEnder) { world.setBlockMetadataWithNotify(x, y, z, 0, 2); return true; } else { player.travelToDimension(1); return true; } } else { if (item != null && item.getItem() == Item.eyeOfEnder) { if (meta > 0) { world.setBlockMetadataWithNotify(x, y, z, meta, 2); --item.stackSize; return true; } } else { nomEndCake(world, x, y, z, player); return true; } } return false; }
Example 10
Source File: PacketChangeGPSToolCoordinate.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public void handleServerSide(PacketChangeGPSToolCoordinate message, EntityPlayer player){ ItemStack playerStack = player.getCurrentEquippedItem(); if(playerStack != null && playerStack.getItem() == Itemss.GPSTool) { ItemGPSTool.setVariable(playerStack, message.variable); if(message.y >= 0) { playerStack.getItem().onItemUse(playerStack, player, player.worldObj, message.x, message.y, message.z, 0, 0, 0, 0); } } }
Example 11
Source File: ModuleLogistics.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override public boolean onActivated(EntityPlayer player){ if(player.getCurrentEquippedItem() != null) { int colorIndex = TileEntityPlasticMixer.getDyeIndex(player.getCurrentEquippedItem()); if(colorIndex >= 0) { if(!player.worldObj.isRemote) { colorChannel = colorIndex; NetworkHandler.sendToAllAround(new PacketUpdateLogisticModule(this, 0), getTube().world()); } return true; } } return super.onActivated(player); }
Example 12
Source File: MoCEntityWerewolf.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
@Override public boolean attackEntityFrom(DamageSource damagesource, int i) { Entity entity = damagesource.getEntity(); if (!getIsHumanForm() && (entity != null) && (entity instanceof EntityPlayer)) { EntityPlayer entityplayer = (EntityPlayer) entity; ItemStack itemstack = entityplayer.getCurrentEquippedItem(); if (itemstack != null) { i = 1; if (itemstack.itemID == Item.hoeGold.itemID) { i = 6; } if (itemstack.itemID == Item.shovelGold.itemID) { i = 7; } if (itemstack.itemID == Item.pickaxeGold.itemID) { i = 8; } if (itemstack.itemID == Item.axeGold.itemID) { i = 9; } if (itemstack.itemID == Item.swordGold.itemID) { i = 10; } } } return super.attackEntityFrom(damagesource, i); }
Example 13
Source File: MoCBlockLeaf.java From mocreaturesdev with GNU General Public License v3.0 | 5 votes |
@Override public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l) { if (!world.isRemote && entityplayer.getCurrentEquippedItem() != null && entityplayer.getCurrentEquippedItem().itemID == Item.shears.itemID) { entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1); dropBlockAsItem_do(world, i, j, k, new ItemStack(MoCreatures.mocLeaf.blockID, 1, l & 3)); } else { super.harvestBlock(world, entityplayer, i, j, k, l); } }
Example 14
Source File: BlockMultiblockGlass.java From BigReactors with MIT License | 5 votes |
@Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) { if(player.isSneaking()) { return false; } // If the player's hands are empty and they rightclick on a multiblock, they get a // multiblock-debugging message if the machine is not assembled. if(!world.isRemote && player.getCurrentEquippedItem() == null) { TileEntity te = world.getTileEntity(x, y, z); if(te instanceof IMultiblockPart) { MultiblockControllerBase controller = ((IMultiblockPart)te).getMultiblockController(); if(controller == null) { player.addChatMessage(new ChatComponentText(String.format("SERIOUS ERROR - server part @ %d, %d, %d has no controller!", x, y, z))); //TODO Localize } else { Exception e = controller.getLastValidationException(); if(e != null) { player.addChatMessage(new ChatComponentText(e.getMessage())); return true; } } } } return false; }
Example 15
Source File: ItemInHandInfoCommand.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 5 votes |
@Override public void processCommand(ICommandSender pCmdSender, String[] pArgs) { try { if (!InGame(pCmdSender)) { PlayerChatHelper.SendPlain(pCmdSender, "You have to execute this command ingame"); return; } EntityPlayer tEp = (EntityPlayer) pCmdSender; ItemStack inHand = null; if (tEp != null) { inHand = tEp.getCurrentEquippedItem(); if (inHand == null) { PlayerChatHelper.SendPlain(pCmdSender, "Pickup an item first"); return; } } GameRegistry.UniqueIdentifier UID = GameRegistry.findUniqueIdentifierFor(inHand.getItem()); PlayerChatHelper.SendPlain(pCmdSender, "== Item info"); PlayerChatHelper.SendPlain(pCmdSender, String.format("Unloc.Name: [%s]", inHand.getUnlocalizedName())); PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemName: [%s]", UID.toString())); PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemMeta: [%s]", inHand.getItemDamage())); PlayerChatHelper.SendPlain(pCmdSender, String.format("FluidContainer: [%s]", getFluidContainerContents(inHand))); PlayerChatHelper.SendPlain(pCmdSender, String.format("ClassName: [%s]", inHand.getItem().getClass().toString())); PlayerChatHelper.SendPlain(pCmdSender, String.format("ItemNBT: [%s]", inHand.stackTagCompound)); } catch (Exception e) { e.printStackTrace(); PlayerChatHelper.SendError(pCmdSender, "Unknown error occoured"); } }
Example 16
Source File: ContainerRemote.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@Override public boolean canInteractWith(EntityPlayer player){ return player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Itemss.remote; }
Example 17
Source File: RenderMovementBlocking.java From Framez with GNU General Public License v3.0 | 4 votes |
@SubscribeEvent public void onRenderTick(RenderWorldLastEvent event) { World world = Minecraft.getMinecraft().theWorld; EntityPlayer player = Minecraft.getMinecraft().thePlayer; MovingObjectPosition mop = world.rayTraceBlocks(RayTracer.instance().getStartVector(player).toVec3(), RayTracer.instance() .getEndVector(player).toVec3()); ItemStack item = player.getCurrentEquippedItem(); if (item == null) return; if (!(item.getItem() instanceof IFramezWrench)) return; if (Minecraft.getMinecraft().gameSettings.hideGUI && Minecraft.getMinecraft().currentScreen == null) return; double thickness = 1 / 32D; GL11.glPushMatrix(); { GL11.glDisable(GL11.GL_TEXTURE_2D); Vec3 playerPos = player.getPosition(event.partialTicks); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); GL11.glColor4d(1, 1, 1, 1); List<TileMotor> l = null; if (mop != null && mop.typeOfHit == MovingObjectType.BLOCK) { TileEntity te = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ); if (te != null && te instanceof TileMotor) { l = new ArrayList<TileMotor>(); l.add((TileMotor) te); } } if (l == null) l = MotorCache.getLoadedMotors(); for (TileMotor m : l) { if (m.getWorldObj() == world) { List<Vec3i> blocking = m.getBlocking(); if (blocking == null || blocking.size() == 0) continue; for (Vec3i b : blocking) { double x = b.getX() - playerPos.xCoord; double y = b.getY() - playerPos.yCoord; double z = b.getZ() - playerPos.zCoord; GL11.glPushMatrix(); { GL11.glTranslated(x - thickness, y - thickness, z - thickness); GL11.glScaled(1 + (thickness * 2), 1 + (thickness * 2), 1 + (thickness * 2)); GL11.glColor4d(1, 0, 0, .25); GL11.glBegin(GL11.GL_QUADS); RenderUtils.drawColoredCube(); GL11.glEnd(); } GL11.glPopMatrix(); GL11.glPushMatrix(); { GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glColor4d(.75, 0, 0, .5); GL11.glLineWidth(2); GL11.glBegin(GL11.GL_LINES); GL11.glVertex3d(m.xCoord - playerPos.xCoord + 0.5, m.yCoord - playerPos.yCoord + 0.5, m.zCoord - playerPos.zCoord + 0.5); GL11.glVertex3d(x + 0.5, y + 0.5, z + 0.5); GL11.glEnd(); GL11.glEnable(GL11.GL_DEPTH_TEST); } GL11.glPopMatrix(); } } } GL11.glDisable(GL11.GL_BLEND); GL11.glEnable(GL11.GL_TEXTURE_2D); } GL11.glPopMatrix(); }
Example 18
Source File: OvenGlove.java From NewHorizonsCoreMod with GNU General Public License v3.0 | 4 votes |
@Override public void onWornTick( ItemStack arg0, EntityLivingBase pEntity ) { try { if( !( pEntity instanceof EntityPlayer ) ) { return; } if( arg0.getItemDamage() == 1 ) // MetaItem 0 is running this loop only { return; } EntityPlayer tPlayer = (EntityPlayer) pEntity; InventoryBaubles tBaubles = PlayerHandler.getPlayerBaubles( tPlayer ); if( tPlayer.isBurning() ) // no fire/lava cheat! { if( isGlovesResistActive( tPlayer ) ) { RemoveFireProtection(pEntity); } return; } if( _mRnd.nextInt( 20 ) == 0 ) { // Player must wear OvenGloves in both slots ItemStack tBaubleRing1 = tBaubles.stackList[1]; ItemStack tBaubleRing2 = tBaubles.stackList[2]; if( tBaubleRing1 == null || tBaubleRing2 == null ) { // Log("Bauble 1 or 2 is null"); return; } if( tBaubleRing1.getUnlocalizedName().contains( _mItemName ) && tBaubleRing2.getUnlocalizedName().contains( _mItemName ) ) { if( tBaubleRing1.getItemDamage() != 0 || tBaubleRing2.getItemDamage() != 1 ) { if( FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT ) { if( !WrongSidePopupShown ) { WrongSidePopupShown = true; Notification noti = new Notification( tBaubleRing1, "Wrong place", "The gloves feel weird..." ); NotificationTickHandler.guiNotification.queueNotification( noti ); } } // Log("Gloves in wrong spots"); return; } if( tBaubleRing1.stackTagCompound == null || tBaubleRing2.stackTagCompound == null ) // Cheated gloves don't have NBT tags sometimes { return; } if( tBaubleRing1.stackTagCompound.getInteger( NBTTAG_DURABILITY ) <= 1 || tBaubleRing2.stackTagCompound.getInteger( NBTTAG_DURABILITY ) <= 1 ) { return; } ItemStack tHeldItem = tPlayer.getCurrentEquippedItem(); if( tHeldItem != null ) { // Update 12.01.2017: Player must hold any item containing Lava if( isValidLavaContainerItem( tHeldItem ) ) { if( !isResistActive( tPlayer ) || isGlovesResistActive( tPlayer ) ) { tPlayer.addPotionEffect( new PotionEffect( Potion.fireResistance.id, potionDuration, potionAmplifier, potionAmbient ) ); int tRandomDamage = _mRnd.nextInt( 10 ); // Randomly damage gloves while giving the protection effect if( tRandomDamage == 1 ) { DamageItem(tBaubleRing1); } else if( tRandomDamage == 2 ) { DamageItem(tBaubleRing2); } } } } } } } catch (Exception e) // Fail-safe for all future crashes { e.printStackTrace(); } }
Example 19
Source File: RedstoneEtherServerAddons.java From WirelessRedstone with MIT License | 4 votes |
public void processSMPMaps(World world) { RedstoneEther.loadServerWorld(world); int dimension = CommonUtils.getDimension(world); ArrayList<EntityPlayer> players = ServerUtils.getPlayersInDimension(dimension); Map<BlockCoord, TXNodeInfo> txnodes = RedstoneEther.server().getTransmittersInDimension(dimension); Set<WirelessTransmittingDevice> devices = RedstoneEther.server().getTransmittingDevicesInDimension(dimension); for (EntityPlayer player : players) { ItemStack helditem = player.getCurrentEquippedItem(); if (helditem == null || helditem.getItem() != WirelessRedstoneAddons.wirelessMap || RedstoneEther.server().isPlayerJammed(player)) { continue; } ItemWirelessMap map = (ItemWirelessMap) helditem.getItem(); MapData mapdata = map.getMapData(helditem, world); if (mapdata.dimension != player.dimension) { continue; } WirelessMapNodeStorage mapnodes = getMapNodes(player); TreeSet<FreqCoord> oldnodes = mapnodes.nodes; int lastdevices = mapnodes.devices.size(); updatePlayerMapData(player, world, mapdata, txnodes, devices); TreeSet<FreqCoord> addednodes = new TreeSet<FreqCoord>(mapnodes.nodes); TreeSet<FreqCoord> removednodes = new TreeSet<FreqCoord>(); if (oldnodes.size() != 0) { for (Iterator<FreqCoord> nodeiterator = oldnodes.iterator(); nodeiterator.hasNext(); ) { FreqCoord node = nodeiterator.next(); if (!addednodes.remove(node))//remove returns false if the item was not in the set { removednodes.add(node); } } } if (addednodes.size() != 0 || removednodes.size() != 0 || devices.size() != 0 || lastdevices > 0) { WRAddonSPH.sendMapUpdatePacketTo(player, helditem.getItemDamage(), mapdata, addednodes, removednodes, mapnodes.devices); } } }
Example 20
Source File: CommonProxy.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z){ switch(EnumGuiId.values()[ID]){ case AIR_COMPRESSOR: return new GuiAirCompressor(player.inventory, (TileEntityAirCompressor)world.getTileEntity(x, y, z)); case ADVANCED_AIR_COMPRESSOR: return new GuiAdvancedAirCompressor(player.inventory, (TileEntityAdvancedAirCompressor)world.getTileEntity(x, y, z)); case AIR_CANNON: return new GuiAirCannon(player.inventory, (TileEntityAirCannon)world.getTileEntity(x, y, z)); case PRESSURE_CHAMBER: return new GuiPressureChamber(player.inventory, (TileEntityPressureChamberValve)world.getTileEntity(x, y, z)); case CHARGING_STATION: return new GuiChargingStation(player.inventory, (TileEntityChargingStation)world.getTileEntity(x, y, z)); case ELEVATOR: return new GuiElevator(player.inventory, (TileEntityElevatorBase)world.getTileEntity(x, y, z)); case PNEUMATIC_HELMET: return new GuiPneumaticHelmet(new ContainerChargingStationItemInventory(player.inventory, (TileEntityChargingStation)world.getTileEntity(x, y, z)), (TileEntityChargingStation)world.getTileEntity(x, y, z)); case PRESSURE_CHAMBER_INTERFACE: return new GuiPressureChamberInterface(player.inventory, (TileEntityPressureChamberInterface)world.getTileEntity(x, y, z)); case VACUUM_PUMP: return new GuiVacuumPump(player.inventory, (TileEntityVacuumPump)world.getTileEntity(x, y, z)); case PNEUMATIC_DOOR: return new GuiPneumaticDoor(player.inventory, (TileEntityPneumaticDoorBase)world.getTileEntity(x, y, z)); case ASSEMBLY_CONTROLLER: return new GuiAssemblyController(player.inventory, (TileEntityAssemblyController)world.getTileEntity(x, y, z)); case UV_LIGHT_BOX: return new GuiUVLightBox(player.inventory, (TileEntityUVLightBox)world.getTileEntity(x, y, z)); case SECURITY_STATION_INVENTORY: return new GuiSecurityStationInventory(player.inventory, (TileEntitySecurityStation)world.getTileEntity(x, y, z)); case HACKING: return new GuiSecurityStationHacking(player.inventory, (TileEntitySecurityStation)world.getTileEntity(x, y, z)); case UNIVERSAL_SENSOR: return new GuiUniversalSensor(player.inventory, (TileEntityUniversalSensor)world.getTileEntity(x, y, z)); case AERIAL_INTERFACE: return new GuiAerialInterface(player.inventory, (TileEntityAerialInterface)world.getTileEntity(x, y, z)); case ELECTROSTATIC_COMPRESSOR: return new GuiElectrostaticCompressor(player.inventory, (TileEntityElectrostaticCompressor)world.getTileEntity(x, y, z)); case APHORISM_TILE: return new GuiAphorismTile((TileEntityAphorismTile)world.getTileEntity(x, y, z)); case OMNIDIRECTIONAL_HOPPER: return new GuiOmnidirectionalHopper(player.inventory, (TileEntityOmnidirectionalHopper)world.getTileEntity(x, y, z)); case PROGRAMMER: return new GuiProgrammer(player.inventory, (TileEntityProgrammer)world.getTileEntity(x, y, z)); case DRONE: return new GuiDrone(new ContainerChargingStationItemInventory(player.inventory, (TileEntityChargingStation)world.getTileEntity(x, y, z)), (TileEntityChargingStation)world.getTileEntity(x, y, z)); case PRESSURE_MODULE: return new GuiPressureModule(player, x, y, z); case AIR_GRATE_MODULE: return new GuiAirGrateModule(player, x, y, z); case PLASTIC_MIXER: return new GuiPlasticMixer(player.inventory, (TileEntityPlasticMixer)world.getTileEntity(x, y, z)); case LIQUID_COMPRESSOR: return new GuiLiquidCompressor(player.inventory, (TileEntityLiquidCompressor)world.getTileEntity(x, y, z)); case ADVANCED_LIQUID_COMPRESSOR: return new GuiAdvancedLiquidCompressor(player.inventory, (TileEntityAdvancedLiquidCompressor)world.getTileEntity(x, y, z)); case LIQUID_HOPPER: return new GuiLiquidHopper(player.inventory, (TileEntityLiquidHopper)world.getTileEntity(x, y, z)); case REMOTE: return new GuiRemote(player.getCurrentEquippedItem()); case REMOTE_EDITOR: return new GuiRemoteEditor(player.getCurrentEquippedItem()); case PROGRAMMABLE_CONTROLLER: return new GuiProgrammableController(player.inventory, (TileEntityProgrammableController)world.getTileEntity(x, y, z)); case GAS_LIFT: return new GuiGasLift(player.inventory, (TileEntityGasLift)world.getTileEntity(x, y, z)); case REFINERY: return new GuiRefinery(player.inventory, (TileEntityRefinery)world.getTileEntity(x, y, z)); case THERMOPNEUMATIC_PROCESSING_PLANT: return new GuiThermopneumaticProcessingPlant(player.inventory, (TileEntityThermopneumaticProcessingPlant)world.getTileEntity(x, y, z)); case LOGISTICS_REQUESTER: return new GuiLogisticsRequester(player.inventory, (SemiBlockRequester)SemiBlockManager.getInstance(world).getSemiBlock(world, x, y, z)); case LOGISTICS_STORAGE: return new GuiLogisticsStorage(player.inventory, (SemiBlockStorage)SemiBlockManager.getInstance(world).getSemiBlock(world, x, y, z)); case LOGISTICS_PASSIVE_PROVIDER: return new GuiLogisticsProvider(player.inventory, (SemiBlockActiveProvider)SemiBlockManager.getInstance(world).getSemiBlock(world, x, y, z)); case AMADRON: return new GuiAmadron(player.inventory); case AMADRON_ADD_TRADE: return new GuiAmadronAddTrade(); case CREATIVE_COMPRESSOR: return new GuiCreativeCompressor((TileEntityCreativeCompressor)world.getTileEntity(x, y, z)); case KEROSENE_LAMP: return new GuiKeroseneLamp(player.inventory, (TileEntityKeroseneLamp)world.getTileEntity(x, y, z)); case SENTRY_TURRET: return new GuiSentryTurret(player.inventory, (TileEntitySentryTurret)world.getTileEntity(x, y, z)); } return ThirdPartyManager.instance().getClientGuiElement(ID, player, world, x, y, z); }