Search in sources :

Example 61 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.

the class ItemPressurizable method getSubItems.

@Override
@SideOnly(Side.CLIENT)
public /**
 * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
 */
void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
    par3List.add(new ItemStack(par1, 1, 0));
    par3List.add(new ItemStack(par1, 1, getMaxDamage()));
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 62 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.

the class ItemRemote method addInformation.

/**
 * allows items to add custom lines of information to the mouseover description
 */
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack remote, EntityPlayer player, List curInfo, boolean moreInfo) {
    super.addInformation(remote, player, curInfo, moreInfo);
    curInfo.add(I18n.format("gui.remote.tooltip.sneakRightClickToEdit"));
    NBTTagCompound tag = remote.getTagCompound();
    if (tag != null && tag.hasKey("securityX")) {
        int x = tag.getInteger("securityX");
        int y = tag.getInteger("securityY");
        int z = tag.getInteger("securityZ");
        int dimensionId = tag.getInteger("securityDimension");
        for (String s : WordUtils.wrap(I18n.format("gui.remote.tooltip.boundToSecurityStation", dimensionId, x, y, z), 40).split(System.getProperty("line.separator"))) {
            curInfo.add(s);
        }
    } else {
        for (String s : WordUtils.wrap(I18n.format("gui.remote.tooltip.rightClickToBind"), 40).split(System.getProperty("line.separator"))) {
            curInfo.add(s);
        }
    }
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 63 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.

the class ItemTubeModule method addInformation.

@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
    super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
    TubeModule module = ModuleRegistrator.getModule(moduleName);
    module.addItemDescription(par3List);
    par3List.add(EnumChatFormatting.DARK_GRAY + "In line: " + (module.isInline() ? "Yes" : "No"));
}
Also used : TubeModule(pneumaticCraft.common.block.tubes.TubeModule) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 64 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.

the class ItemAssemblyProgram method addInformation.

@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List infoList, boolean par4) {
    infoList.add("Required Machines:");
    infoList.add("-" + Blockss.assemblyController.getLocalizedName());
    if (referencePrograms == null) {
        referencePrograms = new AssemblyProgram[PROGRAMS_AMOUNT];
        for (int i = 0; i < PROGRAMS_AMOUNT; i++) {
            referencePrograms[i] = getProgramFromItem(i);
        }
    }
    AssemblyProgram program = referencePrograms[Math.min(stack.getItemDamage(), PROGRAMS_AMOUNT - 1)];
    AssemblyProgram.EnumMachine[] requiredMachines = program.getRequiredMachines();
    for (AssemblyProgram.EnumMachine machine : requiredMachines) {
        switch(machine) {
            case PLATFORM:
                infoList.add("-" + Blockss.assemblyPlatform.getLocalizedName());
                break;
            case DRILL:
                infoList.add("-" + Blockss.assemblyDrill.getLocalizedName());
                break;
            case LASER:
                infoList.add("-" + Blockss.assemblyLaser.getLocalizedName());
                break;
            case IO_UNIT_EXPORT:
                // TODO localize
                infoList.add("-" + Blockss.assemblyIOUnit.getLocalizedName() + " (export)");
                break;
            case IO_UNIT_IMPORT:
                infoList.add("-" + Blockss.assemblyIOUnit.getLocalizedName() + " (import)");
                break;
        }
    }
}
Also used : AssemblyProgram(pneumaticCraft.common.recipes.programs.AssemblyProgram) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 65 with SideOnly

use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.

the class ItemEmptyPCB method getSubItems.

@Override
@SideOnly(Side.CLIENT)
public /**
 * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
 */
void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
    par3List.add(new ItemStack(par1, 1, 0));
    par3List.add(new ItemStack(par1, 1, getMaxDamage()));
}
Also used : ItemStack(net.minecraft.item.ItemStack) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

SideOnly (cpw.mods.fml.relauncher.SideOnly)204 ItemStack (net.minecraft.item.ItemStack)52 IIcon (net.minecraft.util.IIcon)17 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)17 Vec3dCube (uk.co.qmunity.lib.vec.Vec3dCube)13 Block (net.minecraft.block.Block)12 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)10 TileEntity (net.minecraft.tileentity.TileEntity)10 AxisAlignedBB (net.minecraft.util.AxisAlignedBB)9 SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)8 ArrayList (java.util.ArrayList)8 Rotation (uk.co.qmunity.lib.transform.Rotation)8 AMParticle (am2.particles.AMParticle)6 IconFlipped (net.minecraft.client.renderer.IconFlipped)6 ItemBlock (net.minecraft.item.ItemBlock)6 Minecraft (net.minecraft.client.Minecraft)5 Tessellator (net.minecraft.client.renderer.Tessellator)5 EntityPlayer (net.minecraft.entity.player.EntityPlayer)5 GuiScreen (net.minecraft.client.gui.GuiScreen)4 RenderHelper (uk.co.qmunity.lib.client.render.RenderHelper)4