Java Code Examples for cpw.mods.fml.relauncher.SideOnly

The following are top voted examples for showing how to use cpw.mods.fml.relauncher.SideOnly. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: MineDonate   File: SupportedFeaturesPacketHandler.java   Source Code and License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(SupportedFeaturesPacket message, MessageContext ctx) {
	
    MineDonate.cfg.sellItems = message.items;
    MineDonate.cfg.itemsMoneyType = message.itemsMoneyType;
    MineDonate.cfg.sellPrivelegies = message.privelegies;
    MineDonate.cfg.privelegiesMoneyType = message.privelegiesMoneyType;
    MineDonate.cfg.sellRegions = message.regions;
    MineDonate.cfg.regionMoneyType = message.regionsMoneyType;
    MineDonate.cfg.sellEntities = message.entities;
    MineDonate.cfg.entitiesMoneyType = message.entitiesMoneyType;
    MineDonate.cfg.userShops = message.userShops;

    MineDonate . loadClientMerch ( ) ;
    
    ShopGUI . instance . defaultCategory = message . firstCatId ;

    return null;
    
}
 
Example 2
Project: minecraft-quiverbow   File: Crossbow_Double.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Bolts: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Bolts: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax);
	list.add(EnumChatFormatting.GREEN + "Knockback " + this.Knockback + " on hit.");
	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");
	list.add(EnumChatFormatting.YELLOW + "Craft with 1 or 2 Arrows to reload.");
	list.add("A sticky piston powers the");
	list.add("reloading mechanism.");

	if (this.getCooldown(stack) != 0) {list.add(EnumChatFormatting.RED + "RE-TAUTING! (" + this.getCooldown(stack) + ")"); }
}
 
Example 3
Project: minecraft-quiverbow   File: Crossbow_Auto.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Bolts: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Bolts: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax);
	list.add(EnumChatFormatting.GREEN + "Knockback " + this.Knockback + " on hit.");
	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");
	list.add(EnumChatFormatting.YELLOW + "Crouch-use to ready a bolt.");
	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Arrow Bundle to reload.");
	list.add("Pistons power the bolt feeder.");
}
 
Example 4
Project: minecraft-quiverbow   File: _ProjectileBase.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
{
    this.motionX = p_70016_1_;
    this.motionY = p_70016_3_;
    this.motionZ = p_70016_5_;

    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
        float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
        this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
        this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI);
        this.prevRotationPitch = this.rotationPitch;
        this.prevRotationYaw = this.rotationYaw;
        this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
        this.ticksInGround = 0;
    }
}
 
Example 5
Project: minecraft-quiverbow   File: DragonBox.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Rockets: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Rockets: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax);
	list.add(EnumChatFormatting.GREEN + "Fire for " + this.FireDur + " sec on hit");
	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");
	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 Firework");
	list.add(EnumChatFormatting.YELLOW + "Bundles to reload.");
	list.add("Crank-powered. The metal is bent.");
}
 
Example 6
Project: TRAPPIST-1   File: WorldProviderTrappistOneB.java   Source Code and License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public float getSunBrightness(float par1) {
   float f1 = this.worldObj.getCelestialAngle(1.0F);
   float f2 = 1.25F - (MathHelper.cos(f1 * 3.1415927F * 2.0F) * 2.0F + 0.2F);
   if(f2 < 0.0F) {
      f2 = 0.0F;
   }

   if(f2 > 1.0F) {
      f2 = 1.0F;
   }

   f2 = 1.2F - f2;
   return f2 * 1.0F;
}
 
Example 7
Project: connor41-etfuturum2   File: ItemBanner.java   Source Code and License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "unchecked", "rawtypes" })
public void addInformation(ItemStack stack, EntityPlayer playerIn, List tooltip, boolean advanced) {
	NBTTagCompound nbttagcompound = getSubTag(stack, "BlockEntityTag", false);

	if (nbttagcompound != null && nbttagcompound.hasKey("Patterns")) {
		NBTTagList nbttaglist = nbttagcompound.getTagList("Patterns", 10);

		for (int i = 0; i < nbttaglist.tagCount() && i < 6; i++) {
			NBTTagCompound nbt = nbttaglist.getCompoundTagAt(i);
			EnumColour colour = EnumColour.fromDamage(nbt.getInteger("Color"));
			EnumBannerPattern pattern = EnumBannerPattern.getPatternByID(nbt.getString("Pattern"));

			if (pattern != null)
				tooltip.add(StatCollector.translateToLocal("item.banner." + pattern.getPatternName() + "." + colour.getMojangName()));
		}
	}
}
 
Example 8
Project: minecraft-quiverbow   File: EnderBow.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
    super.addInformation(stack, player, list, par4);
    
    int ammo = this.getMaxDamage() - this.getDamage(stack);
    
    list.add(EnumChatFormatting.BLUE + "Durability: " + ammo + " / " + this.getMaxDamage());
    
    list.add(EnumChatFormatting.GREEN + "Zoom on use.");
    list.add(EnumChatFormatting.GREEN + "Predictive arrow on use.");
    
    list.add("An ender-eye scope is attached.");
    list.add("It's staring at you.");
   }
 
Example 9
Project: minecraft-quiverbow   File: SilkenSpinner.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Webs: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Webs: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.GREEN + "Places cobweb on hit.");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");

	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 Cobwebs to reload.");

	list.add("Feels vaguely sticky.");
}
 
Example 10
Project: connor41-etfuturum2   File: TileEntityBanner.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
private void initializeBannerData() {
	if (patternList == null || colorList == null || field_175121_j == null)
		if (!field_175119_g)
			field_175121_j = "";
		else {
			patternList = Lists.newArrayList();
			colorList = Lists.newArrayList();
			patternList.add(TileEntityBanner.EnumBannerPattern.BASE);
			colorList.add(EnumColour.fromDamage(baseColor));
			field_175121_j = "b" + baseColor;

			if (patterns != null)
				for (int i = 0; i < patterns.tagCount(); i++) {
					NBTTagCompound nbttagcompound = patterns.getCompoundTagAt(i);
					EnumBannerPattern pattern = EnumBannerPattern.getPatternByID(nbttagcompound.getString("Pattern"));

					if (pattern != null) {
						patternList.add(pattern);
						int j = nbttagcompound.getInteger("Color");
						colorList.add(EnumColour.fromDamage(j));
						field_175121_j = field_175121_j + pattern.getPatternID() + j;
					}
				}
		}
}
 
Example 11
Project: minecraft-quiverbow   File: Sunray.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
    super.addInformation(stack, player, list, par4);
    
    if (stack.stackTagCompound != null)
    {
    	double dur = (1d / Cooldown) * (Cooldown - this.getCooldown(stack));
    	double displayDur = (dur * 100);	// Casting to int. We only need the full digits
    	
    	list.add(EnumChatFormatting.BLUE + "Charge: " + (int) displayDur + "%");
    }
    
    list.add(EnumChatFormatting.BLUE + "Damage: " + DmgMin + " - " + DmgMax);
    
    list.add(EnumChatFormatting.GREEN + "Sets target on fire for " + FireDur + " sec.");
    list.add(EnumChatFormatting.GREEN + "Passes through walls.");
   
    list.add(EnumChatFormatting.RED + "Charges for " + this.displayInSec(Cooldown) + " sec after use.");
    list.add(EnumChatFormatting.RED + "Requires strong light to charge.");
    
    list.add("The refurbished beacon emits a low hum.");
   }
 
Example 12
Project: minecraft-quiverbow   File: MediGun.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean advancedTooltips)	// Seems to be true when the F3 + H screen is up
{
	super.addInformation(stack, player, list, advancedTooltips);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Potion: INFINITE / " + this.getMaxDamage() + " mb");
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Potion: " + ammo + " / " + this.getMaxDamage() + " mb");
	}

	list.add(EnumChatFormatting.GREEN + "Regeneration 3 for 1 sec on hit.");
	list.add(EnumChatFormatting.GREEN + "Sustained.");

	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 Regeneration");
	list.add(EnumChatFormatting.YELLOW + "Potions (I or II) to reload.");

	list.add("The beacon shimmers encouragingly.");
}
 
Example 13
Project: minecraft-quiverbow   File: PowderKnuckle.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Gunpowder: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Gunpowder: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + (this.DmgMax + 1));

	list.add(EnumChatFormatting.GREEN + "Explosion with radius " + this.ExplosionSize + " on hit.");

	list.add(EnumChatFormatting.YELLOW + "Punch to attack mobs, Use to attack terrain.");
	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 gunpowder to reload.");

	list.add("Not safe for use.");
}
 
Example 14
Project: CursedLasso   File: ItemCursedLasso.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
    if(par1ItemStack != null) {
        String mobName = getMobTypeFromStack(par1ItemStack);
        if(mobName != null) {
            par3List.add(getDisplayNameForEntity(mobName));
        }
    }
    super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
}
 
Example 15
Project: minecraft-quiverbow   File: EnderRifle.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/EnderRifle");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/EnderRifle_Empty");
}
 
Example 16
Project: connor41-etfuturum2   File: TippedArrow.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubItems(Item item, CreativeTabs tab, List list) {
	List<ItemStack> potions = new ArrayList<ItemStack>();
	ModItems.lingering_potion.getSubItems(ModItems.lingering_potion, tab, potions);
	for (ItemStack potion : potions) {
		List<PotionEffect> effects = PotionHelper.getPotionEffects(potion.getItemDamage(), false);
		if (effects != null && !effects.isEmpty())
			for (PotionEffect effect : effects)
				list.add(setEffect(new ItemStack(this), Potion.potionTypes[effect.getPotionID()], effect.getDuration() / 2));
	}
}
 
Example 17
Project: minecraft-quiverbow   File: Crossbow_Blaze.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowBlaze");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowBlaze_Empty");
}
 
Example 18
Project: McHeliPrivacyShield   File: ChatBuilder.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void chatClient(final @Nonnull ChatBuilder chat) {
	final Minecraft mc = FMLClientHandler.instance().getClient();
	if (mc.thePlayer!=null) {
		final IChatComponent msg = chat.build();
		if (chat.useId)
			mc.ingameGUI.getChatGUI().printChatMessageWithOptionalDeletion(msg, chat.id);
		else
			mc.thePlayer.addChatComponentMessage(msg);
	}
}
 
Example 19
Project: minecraft-quiverbow   File: SoulCairn.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/SoulCairn");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/SoulCairn_Empty");
}
 
Example 20
Project: minecraft-quiverbow   File: LapisMagazine.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) 	// getSubItems
{
	list.add(new ItemStack(item, 1, 0));
	list.add(new ItemStack( item, 1, this.getMaxDamage() ));
}
 
Example 21
Project: Technical   File: Machine.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
	this.blockIcon = iconRegister.registerIcon(Technical.modName + ":" + type.lowerCaseName + "Side");
	this.front = iconRegister.registerIcon(isActive ? Technical.modName + ":" + type.lowerCaseName + "Active" : Technical.modName + ":" + type.lowerCaseName + "Idle");
	this.top = iconRegister.registerIcon(Technical.modName + ":" + type.lowerCaseName + "Top");

}
 
Example 22
Project: ThaumOres   File: BlockInfusedBlockOre.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public boolean addHitEffects(World worldObj, MovingObjectPosition target, EffectRenderer effectRenderer) {
	int md = worldObj.getBlockMetadata(target.blockX, target.blockY, target.blockZ);
	if (md < 6)
		UtilsFX.infusedStoneSparkle(worldObj, target.blockX, target.blockY, target.blockZ, md + 1);
	return super.addHitEffects(worldObj, target, effectRenderer);
}
 
Example 23
Project: IceMod   File: IceSword.java   Source Code and License 5 votes vote down vote up
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
	{
        this.itemIcon = iconRegister.registerIcon(texturePath); 
    }
 
Example 24
Project: minecraft-quiverbow   File: NetherBellows.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/NetherBellows");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/NetherBellows_Empty");
}
 
Example 25
Project: minecraft-quiverbow   File: SnowCannon.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Snow: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Snow: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax + " per Snowball");

	list.add(EnumChatFormatting.GREEN + "Scatter 4 when firing.");
	list.add(EnumChatFormatting.GREEN + "Slowness " + this.Slow_Strength + " for " + this.displayInSec(this.Slow_Duration) + " sec on hit.");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");

	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 Snow Blocks to reload.");

	list.add("Hoarfrost is forming around the trigger.");
}
 
Example 26
Project: minecraft-quiverbow   File: EnderQuartzClip.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
   public void registerIcons(IIconRegister par1IconRegister) 
{ 
	Icon = par1IconRegister.registerIcon("quiverchevsky:ammo/EnderAmmo");
	Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:ammo/EnderAmmo_Empty");
}
 
Example 27
Project: TFCPrimitiveTech   File: BlockWoodenPressWet.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public int colorMultiplier(IBlockAccess world, int x, int y, int z)
{
    int meta = world.getBlockMetadata(x, y, z);
    
    return getRenderColor(meta);
}
 
Example 28
Project: connor41-etfuturum2   File: LayeredColorMaskTexture.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
private int func_180188_d(int p_180188_0_, int p_180188_1_) {
	int k = (p_180188_0_ & 16711680) >> 16;
	int l = (p_180188_1_ & 16711680) >> 16;
	int i1 = (p_180188_0_ & 65280) >> 8;
	int j1 = (p_180188_1_ & 65280) >> 8;
	int k1 = (p_180188_0_ & 255) >> 0;
	int l1 = (p_180188_1_ & 255) >> 0;
	int i2 = (int) ((float) k * (float) l / 255.0F);
	int j2 = (int) ((float) i1 * (float) j1 / 255.0F);
	int k2 = (int) ((float) k1 * (float) l1 / 255.0F);
	return p_180188_0_ & -16777216 | i2 << 16 | j2 << 8 | k2;
}
 
Example 29
Project: minecraft-quiverbow   File: AquaAccelerator.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{  
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/WaterGun");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/WaterGun_Empty");
}
 
Example 30
Project: Technical   File: Grabber.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
	this.front = iconRegister.registerIcon(Technical.modName + ":" + "grabberFront");
	this.side0 = iconRegister.registerIcon(Technical.modName + ":" + "grabberSide0");
	this.side1 = iconRegister.registerIcon(Technical.modName + ":" + "grabberSide1");
	this.side2 = iconRegister.registerIcon(Technical.modName + ":" + "grabberSide2");
	this.side3 = iconRegister.registerIcon(Technical.modName + ":" + "grabberSide3");
}
 
Example 31
Project: minecraft-quiverbow   File: Crossbow_Double.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowDouble");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowDouble_Empty");
	this.Icon_Half = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowDouble_Half");
}
 
Example 32
Project: minecraft-quiverbow   File: SeedSweeper.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Seeds: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Seeds: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.Dmg + " per seed.");

	list.add(EnumChatFormatting.GREEN + "Scatter 8 when firing.");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");

	list.add(EnumChatFormatting.YELLOW + "Crouch-use to drop the current jar.");
	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Seed Jar to reload");
	list.add(EnumChatFormatting.YELLOW + "when empty.");

	list.add("Git off my farm!");
}
 
Example 33
Project: minecraft-quiverbow   File: DragonBox_Quad.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Rocket Sets: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Rocket Sets: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax + " per rocket");

	list.add(EnumChatFormatting.GREEN + "Scatter 4 on use");
	list.add(EnumChatFormatting.GREEN + "Fire for " + this.FireDur + " sec on hit");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");

	list.add(EnumChatFormatting.YELLOW + "Craft with up to 8 Rocket Bundles");
	list.add(EnumChatFormatting.YELLOW + "to reload.");

	list.add("\"Four Dragonboxes strapped together.");
	list.add(EnumChatFormatting.RED + "What could go wrong?" + EnumChatFormatting.GRAY + "\"");	// Right now? Nothing. I may have to think of something there
}
 
Example 34
Project: minecraft-quiverbow   File: OWR.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/OWR");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/OWR_Empty");
}
 
Example 35
Project: IceMod   File: FlintAndIce.java   Source Code and License 5 votes vote down vote up
@Override   
@SideOnly(Side.CLIENT)


    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
 
Example 36
Project: minecraft-quiverbow   File: _WeaponBase.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) 	// getSubItems
{
	list.add(new ItemStack(item, 1, 0));
	list.add(new ItemStack(item, 1, this.getMaxDamage()));
}
 
Example 37
Project: minecraft-quiverbow   File: OSR.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/OSR");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/OSR_Empty");
}
 
Example 38
Project: OpenSensors   File: BlockSensor.java   Source Code and License 5 votes vote down vote up
/**
 * Called when the block is placed in the world.
 */
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int dir)
{
	
	if (dir == 0 && side == 4)
	{
		return frontIcon;
	}
	
	switch (side)
	{
	case 2: 
		if (dir == 0)
		{
			return frontIcon;
		}
		return sideIcon;
	case 3: 
		if (dir == 4)
			return frontIcon;
		if (dir == 2) {
			return frontIcon;
		}
		return sideIcon;
	case 4: 
		if (dir == 3)
		{
			return frontIcon;
		}
		return sideIcon;
	case 5: 
		if (dir == 1)
		{
			return frontIcon;
		}
		return sideIcon;
	}
	return sideIcon;
}
 
Example 39
Project: minecraft-quiverbow   File: Endernymous.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/EnderNymous");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/EnderNymous_Empty");
}
 
Example 40
Project: Technical   File: Pipe.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iiconRegister) {
	this.front = iiconRegister.registerIcon(Technical.modName + ":" + "pipeFront");
	this.side0 = iiconRegister.registerIcon(Technical.modName + ":" + "pipeSide0");
	this.side1 = iiconRegister.registerIcon(Technical.modName + ":" + "pipeSide1");
	this.side2 = iiconRegister.registerIcon(Technical.modName + ":" + "pipeSide2");
	this.side3 = iiconRegister.registerIcon(Technical.modName + ":" + "pipeSide3");
}
 
Example 41
Project: minecraft-quiverbow   File: LargeRedstoneMagazine.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List list) 	// getSubItems
{
	list.add(new ItemStack(item, 1, 0));
	list.add(new ItemStack( item, 1, this.getMaxDamage() ));
}
 
Example 42
Project: minecraft-quiverbow   File: QuiverBow.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public IIcon getItemIconForUseDuration(int state) // Inventory display
{
	if (state == 0) { return this.pull_0; }
	else if (state == 1) { return this.pull_1; }
	else if (state == 2) { return this.pull_2; }

	return this.pull_2; // Fallback
}
 
Example 43
Project: IceMod   File: IcePickaxe.java   Source Code and License 5 votes vote down vote up
@Override   
@SideOnly(Side.CLIENT)

    public void registerIcons(IconRegister iconRegister)
    {
        this.itemIcon = iconRegister.registerIcon(texturePath);
    }
 
Example 44
Project: minecraft-quiverbow   File: NetherBellows.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Netherrack: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Netherrack: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.Dmg + " per stream.");

	list.add(EnumChatFormatting.GREEN + "Fire for " + this.FireDur + " sec on hit.");
	list.add(EnumChatFormatting.GREEN + "Sets fire to terrain.");

	list.add(EnumChatFormatting.YELLOW + "Crouch-use to drop the current magazine.");
	list.add(EnumChatFormatting.YELLOW + "Craft with a Large Netherrack Magazine");
	list.add(EnumChatFormatting.YELLOW + "to reload.");

	list.add("Vague whispers of torment can be heard.");
}
 
Example 45
Project: minecraft-quiverbow   File: FrostLancer.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Cold Iron: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Cold Iron: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.BLUE + "Damage: " + this.DmgMin + " - " + this.DmgMax);

	list.add(EnumChatFormatting.GREEN + "Slowness " + this.Slowness_Str + " for " + this.displayInSec(this.Slowness_Dur) + " sec on hit.");
	list.add(EnumChatFormatting.GREEN + "Nausea 1 for " + this.displayInSec(this.Nausea_Dur) + " sec on hit.");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");

	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Cold Iron Clip to reload.");
	list.add(EnumChatFormatting.YELLOW + "Crouch to zoom.");

	list.add("A quartz ender-eye scope is attached.");
	list.add("It's staring past you with aloof disdain.");

	if (this.getCooldown(stack) > 0)
	{
		list.add(EnumChatFormatting.RED + "COOLING DOWN! (" + this.getCooldown(stack) + ")");
	}
}
 
Example 46
Project: connor41-etfuturum2   File: ItemGeneric.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubItems(Item item, CreativeTabs tabs, List list) {
	for (int i = 0; i < types.length; i++)
		list.add(new ItemStack(item, 1, i));
}
 
Example 47
Project: minecraft-quiverbow   File: FlintDuster.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/FlintDrill");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/FlintDrill_Empty");
}
 
Example 48
Project: Technical   File: BlockBaryteSlate.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
	Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
	if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata(p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) {
		return true;
	}

	if (block == this) {
		return false;
	}
	return true;
}
 
Example 49
Project: connor41-etfuturum2   File: BlockGeneric.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
	icons = new IIcon[types.length];
	for (int i = 0; i < types.length; i++)
		if ("".equals(types[i]))
			icons[i] = reg.registerIcon(getTextureName());
		else
			icons[i] = reg.registerIcon(getTextureName() + "_" + types[i]);
}
 
Example 50
Project: connor41-etfuturum2   File: FrostedIce.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister reg) {
	icons = new IIcon[4];
	for (int i = 0; i < icons.length; i++)
		icons[i] = reg.registerIcon(getTextureName() + "_" + i);
}
 
Example 51
Project: connor41-etfuturum2   File: ItemBanner.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public int getColorFromItemStack(ItemStack stack, int renderPass) {
	if (renderPass == 0)
		return 0xFFFFFF;
	else {
		EnumColour EnumColour = getBaseColor(stack);
		return EnumColour.getRGB();
	}
}
 
Example 52
Project: minecraft-quiverbow   File: CoinTosser_Mod.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/CoinTosser_Modified");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/CoinTosser_Modified_Empty");
}
 
Example 53
Project: minecraft-quiverbow   File: RedSprayer.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
{
	super.addInformation(stack, player, list, par4);

	if (player.capabilities.isCreativeMode)
	{
		list.add(EnumChatFormatting.BLUE + "Redstone: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Redstone: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.GREEN + "Wither " + this.Wither_Strength + " for " + this.displayInSec(this.Wither_Duration) + " sec on hit.");
	list.add(EnumChatFormatting.GREEN + "Blindness 1 for " + this.displayInSec(this.Blindness_Duration) + " sec on hit.");

	list.add(EnumChatFormatting.RED + "Does not deal direct damage.");

	list.add(EnumChatFormatting.YELLOW + "Crouch-use to drop the current magazine.");
	list.add(EnumChatFormatting.YELLOW + "Craft with a Large Redstone Magazine");
	list.add(EnumChatFormatting.YELLOW + "to reload.");

	list.add("The muzzle is slightly corroded.");
}
 
Example 54
Project: Technical   File: BlockBaryteOre.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
	Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
	if (p_149646_1_.getBlockMetadata(p_149646_2_, p_149646_3_, p_149646_4_) != p_149646_1_.getBlockMetadata(p_149646_2_ - Facing.offsetsXForSide[p_149646_5_], p_149646_3_ - Facing.offsetsYForSide[p_149646_5_], p_149646_4_ - Facing.offsetsZForSide[p_149646_5_])) {
		return true;
	}

	if (block == this) {
		return false;
	}
	return true;
}
 
Example 55
Project: CursedLasso   File: ItemCursedLasso.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack item, int pass) {
    return item.hasTagCompound();
}
 
Example 56
Project: Technical   File: TechnicalItem.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister) {
	itemIcon = par1IconRegister.registerIcon(Technical.modName + ":" + getUnlocalizedName().substring(5));
}
 
Example 57
Project: connor41-etfuturum2   File: TileEntityBanner.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public List<EnumColour> getColorList() {
	initializeBannerData();
	return colorList;
}
 
Example 58
Project: connor41-etfuturum2   File: TileEntityEndRod.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getRenderBoundingBox() {
	return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
}
 
Example 59
Project: TFCPrimitiveTech   File: ItemCelluloseFibers.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister registerer)
{
	this.itemIcon = registerer.registerIcon(ModDetails.ModID+":"+"ItemCelluloseFibers");
}
 
Example 60
Project: MineDonate   File: MerchCategory.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.SERVER)
public abstract String getDatabaseTable ( ) ;