use of tonius.simplyjetpacks.gui.GuiPack in project SimplyJetpacks by Tonius.
the class GuiHandler method getClientGuiElement.
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
switch(ID) {
case PACK:
ItemStack chestplate = player.getCurrentArmor(2);
if (chestplate != null && chestplate.getItem() instanceof ItemPack) {
ItemPack packItem = (ItemPack) chestplate.getItem();
PackBase pack = packItem.getPack(chestplate);
if (pack != null) {
return new GuiPack(new ContainerPack(chestplate, packItem, pack));
}
}
}
return null;
}
Aggregations