use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class ItemKeycardBase method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
if (level == 3) {
if (par1ItemStack.getTagCompound() == null) {
par1ItemStack.setTagCompound(new NBTTagCompound());
par1ItemStack.getTagCompound().setInteger("Uses", 5);
}
par3List.add(StatCollector.translateToLocal("tooltip.keycard.uses") + " " + par1ItemStack.getTagCompound().getInteger("Uses"));
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class ItemModule method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
if (nbtCanBeModified || canBeCustomized())
par3List.add(StatCollector.translateToLocal("tooltip.module.modifiable"));
else
par3List.add(StatCollector.translateToLocal("tooltip.module.notModifiable"));
if (nbtCanBeModified) {
par3List.add(StatCollector.translateToLocal("tooltip.module.playerCustomization.usage"));
par3List.add(" ");
par3List.add(StatCollector.translateToLocal("tooltip.module.playerCustomization.players") + ":");
if (par1ItemStack.getTagCompound() != null)
for (int i = 1; i <= 10; i++) if (!par1ItemStack.getTagCompound().getString("Player" + i).isEmpty())
par3List.add(par1ItemStack.getTagCompound().getString("Player" + i));
}
if (canBeCustomized()) {
if (numberOfItemAddons > 0 && numberOfBlockAddons > 0)
par3List.add(StatCollector.translateToLocal("tooltip.module.itemAddons.usage.blocksAndItems").replace("#blocks", numberOfBlockAddons + "").replace("#items", numberOfItemAddons + ""));
if (numberOfItemAddons > 0 && numberOfBlockAddons == 0)
par3List.add(StatCollector.translateToLocal("tooltip.module.itemAddons.usage.items").replace("#", numberOfItemAddons + ""));
if (numberOfItemAddons == 0 && numberOfBlockAddons > 0)
par3List.add(StatCollector.translateToLocal("tooltip.module.itemAddons.usage.blocks").replace("#", numberOfBlockAddons + ""));
if (getNumberOfAddons() > 0) {
par3List.add(" ");
par3List.add(StatCollector.translateToLocal("tooltip.module.itemAddons.added") + ":");
for (Item item : getItemAddons(par1ItemStack.getTagCompound())) par3List.add("- " + StatCollector.translateToLocal(item.getUnlocalizedName() + ".name"));
for (Block block : getBlockAddons(par1ItemStack.getTagCompound())) par3List.add("- " + StatCollector.translateToLocal(block.getLocalizedName()));
}
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class BlockReinforcedOldLog method getSubBlocks.
/**
* returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
*/
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) {
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.OAK.getMetadata()));
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.SPRUCE.getMetadata()));
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.BIRCH.getMetadata()));
list.add(new ItemStack(itemIn, 1, BlockPlanks.EnumType.JUNGLE.getMetadata()));
}
use of net.minecraftforge.fml.relauncher.SideOnly in project SecurityCraft by Geforce132.
the class BlockReinforcedSlabs2 method getSubBlocks.
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) {
BlockReinforcedSlabs2.EnumType[] aenumtype = BlockReinforcedSlabs2.EnumType.values();
for (int i = 0; i < aenumtype.length; i++) {
BlockReinforcedSlabs2.EnumType enumtype = aenumtype[i];
list.add(new ItemStack(itemIn, 1, enumtype.getMetadata()));
}
}
use of net.minecraftforge.fml.relauncher.SideOnly in project Bookshelf by Darkhax-Minecraft.
the class PlayerUtils method sendSpamlessMessage.
/**
* Sends a spamless message to the chat. A spamless message is one that only shows up in
* the chat once. If another version of the message were to be added to chat, the earlier
* one would be removed.
*
* @param messageID A unique message ID used to separate your message from the others. It
* is highly recommended to use a random number to prevent conflicts with other mods
* doing similar things. Each message type should have it's own ID.
* @param message The message to send to chat, this message will replace earlier messages
* in the gui that use the same ID.
*/
@SideOnly(Side.CLIENT)
public static void sendSpamlessMessage(int messageID, ITextComponent message) {
final GuiNewChat chat = Minecraft.getMinecraft().ingameGUI.getChatGUI();
chat.printChatMessageWithOptionalDeletion(message, messageID);
}
Aggregations