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()));
}
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);
}
}
}
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"));
}
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;
}
}
}
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()));
}
Aggregations