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

The following are top voted examples for showing how to use cpw.mods.fml.relauncher.Side. 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: minecraft-quiverbow   File: _ProjectileBase.java   View source code 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 2
Project: minecraft-quiverbow   File: RPG_Imp.java   View source code 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.GREEN + "Explosion with radius " + this.ExplosionSize + " on hit.");
	list.add(EnumChatFormatting.GREEN + "Loads pre-made rockets.");

	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Big Rocket to reload.");

	list.add("Detonates on impact.");
	list.add("This seems fairly safe.");
}
 
Example 3
Project: minecraft-quiverbow   File: Mortar_Arrow.java   View source code 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 + "Arrow Bundles: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Arrow Bundles: " + ammo + " / " + this.getMaxDamage());
	}

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

	list.add(EnumChatFormatting.GREEN + "Scatter 8 on impact.");

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

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

	list.add("Arrow tips are poking out of the barrel.");
}
 
Example 4
Project: connor41-etfuturum2   File: EtFuturum.java   View source code 6 votes vote down vote up
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	ConfigurationHandler.INSTANCE.init(new File(event.getModConfigurationDirectory().getAbsolutePath() + File.separator + Reference.MOD_ID + ".cfg"));

	GameRegistry.registerWorldGenerator(new EtFuturumWorldGenerator(), 0);
	GameRegistry.registerWorldGenerator(new EtFuturumNetherGenerator(), 1);

	ModBlocks.init();
	ModItems.init();
	ModEnchantments.init();

	OceanMonument.makeMap();

	NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
	networkWrapper = NetworkRegistry.INSTANCE.newSimpleChannel(Reference.MOD_ID);
	networkWrapper.registerMessage(ArmourStandInteractHandler.class, ArmourStandInteractMessage.class, 0, Side.SERVER);
	networkWrapper.registerMessage(BlackHeartParticlesHandler.class, BlackHeartParticlesMessage.class, 1, Side.CLIENT);
	networkWrapper.registerMessage(SetPlayerModelHandler.class, SetPlayerModelMessage.class, 2, Side.CLIENT);
}
 
Example 5
Project: TRAPPIST-1   File: WorldProviderTrappistOneB.java   View source code 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 6
Project: minecraft-quiverbow   File: FenFire.java   View source code 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 + "Lights: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Lights: " + ammo + " / " + this.getMaxDamage());
	}

	list.add(EnumChatFormatting.GREEN + "Fire for " + this.FireDur + " sec on hit.");
	list.add(EnumChatFormatting.GREEN + "Places glowstone on terrain hit.");

	list.add(EnumChatFormatting.RED + "Cooldown for " + this.displayInSec(this.Cooldown) + " sec on use.");	// 2 digits after the comma only

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

	list.add("It's emanating a warm light.");
}
 
Example 7
Project: minecraft-quiverbow   File: SilkenSpinner.java   View source code 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 8
Project: ExtraAcC   File: AirCooling.java   View source code 6 votes vote down vote up
@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		float new_overload;
		if (player.worldObj.provider.isHellWorld) {
			new_overload = Math.min(ctx.cpData.getOverload(), ctx.cpData.getMaxOverload() / 2);
		} else {
			float f = MathUtils.lerpf(50, 200, ctx.getSkillExp());
			new_overload = Math.max(ctx.cpData.getOverload() - f, 0);
			player.extinguish();
		}
		ctx.cpData.setOverload(new_overload);
		ctx.addSkillExp(getExpIncr());
		ctx.setCooldown((int)MathUtils.lerpf(200, 100, ctx.getSkillExp()));
	}
    terminate();
}
 
Example 9
Project: connor41-etfuturum2   File: ItemBanner.java   View source code 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 10
Project: Technical   File: BlockBaryteOre.java   View source code 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 11
Project: minecraft-quiverbow   File: Crossbow_Compact.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/Crossbow");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/Crossbow_Empty");
}
 
Example 12
Project: LetsEncryptRoot   File: LetsEncryptRoot.java   View source code 5 votes vote down vote up
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event){
    if (event.getSide() == Side.SERVER) {
        logger.info("Client side only mod - not doing anything on the server!");
        return;
    }
}
 
Example 13
Project: minecraft-quiverbow   File: PowderKnuckle_Mod.java   View source code 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 + "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.GREEN + "Mining 3x3x3 on use.");
	list.add(EnumChatFormatting.GREEN + "Silktouch 1 on use.");

	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("Modified for blast mining.");
}
 
Example 14
Project: connor41-etfuturum2   File: LingeringPotion.java   View source code 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>();
	super.getSubItems(item, tab, potions);

	for (ItemStack potion : potions)
		if (!isSplash(potion.getItemDamage()))
			list.add(potion);
}
 
Example 15
Project: ThaumOres   File: ItemShardCluster.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister register) {
	for (int meta = 0; meta < 6; meta++)
		icon[meta] = register.registerIcon(ThaumOresMod.MODID + ":heavyshard_" + meta);
	icon[6] = register.registerIcon(ThaumOresMod.MODID + ":clustershard");
}
 
Example 16
Project: Technical   File: Pipe.java   View source code 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 17
Project: Technical   File: BlockBaryteLimestone.java   View source code 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 18
Project: minecraft-quiverbow   File: OWR.java   View source code 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 19
Project: minecraft-quiverbow   File: GoldMagazine.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
   public void registerIcons(IIconRegister par1IconRegister) 
{ 
	Icon = par1IconRegister.registerIcon("quiverchevsky:ammo/GoldAmmo");
	Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:ammo/GoldAmmo_Empty");
}
 
Example 20
Project: minecraft-quiverbow   File: SoulCairn.java   View source code 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 21
Project: minecraft-quiverbow   File: SugarEngine.java   View source code 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 + "Sugar Rods: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Sugar Rods: " + ammo + " / " + this.getMaxDamage());
	}

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

	list.add(EnumChatFormatting.GREEN + "Fires ~20 rods per second.");

	list.add(EnumChatFormatting.RED + "Start-up Time: " + this.displayInSec(this.getSpinupTime()) + " sec.");

	list.add(EnumChatFormatting.YELLOW + "Crouch-use to drop the current clip.");
	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Clip of Sugar Rods");
	list.add(EnumChatFormatting.YELLOW + "to reload when empty.");

	list.add("So many barrels. Why so many barrels?");
}
 
Example 22
Project: connor41-etfuturum2   File: BlockBeetroot.java   View source code 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta) {
	if (meta < 7) {
		if (meta == 6)
			meta = 5;
		return icons[meta >> 1];
	} else
		return icons[3];
}
 
Example 23
Project: minecraft-quiverbow   File: Crossbow_Auto.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)	// We got need for a non-typical icon currently. Will be phased out
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowAuto");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowAuto_Empty");
	this.Icon_Unchambered = par1IconRegister.registerIcon("quiverchevsky:weapons/CrossbowAuto_Unchambered");
}
 
Example 24
Project: connor41-etfuturum2   File: ItemGeneric.java   View source code 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 25
Project: TRAPPIST-1   File: WorldProviderTrappistOneB.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
  @Override
  public IRenderHandler getSkyRenderer()
  {
  	if (super.getSkyRenderer() == null)
{
	this.setSkyRenderer(new SkyProviderTrappistOneB());
}

return super.getSkyRenderer();
  }
 
Example 26
Project: connor41-etfuturum2   File: ItemGeneric.java   View source code 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister reg) {
	icons = new IIcon[types.length];
	for (int i = 0; i < types.length; i++)
		icons[i] = reg.registerIcon(getIconString() + "_" + types[i]);
}
 
Example 27
Project: minecraft-quiverbow   File: GatlingAmmo.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
   public void registerIcons(IIconRegister par1IconRegister) 
{ 
	Icon = par1IconRegister.registerIcon("quiverchevsky:ammo/GatlingAmmo");
	Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:ammo/GatlingAmmo_Empty");
}
 
Example 28
Project: TFCPrimitiveTech   File: ModClientProxy.java   View source code 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void loadOptions()
{
	//Load our settings from the server
	ModOptions.loadSettings();
}
 
Example 29
Project: minecraft-quiverbow   File: SugarEngine.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister)
{
	this.Icon = par1IconRegister.registerIcon("quiverchevsky:weapons/SugarGatling");
	this.Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:weapons/SugarGatling_Empty");
}
 
Example 30
Project: connor41-etfuturum2   File: BlockGeneric.java   View source code 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
	for (int i = startMeta; i < types.length; i++)
		list.add(new ItemStack(item, 1, i));
}
 
Example 31
Project: minecraft-quiverbow   File: ObsidianMagazine.java   View source code 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
   public void registerIcons(IIconRegister par1IconRegister) 
{ 
	Icon = par1IconRegister.registerIcon("quiverchevsky:ammo/ObsidianAmmo");
	Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:ammo/ObsidianAmmo_Empty");
}
 
Example 32
Project: minecraft-quiverbow   File: CoinTosser_Mod.java   View source code 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 33
Project: minecraft-quiverbow   File: OSR.java   View source code 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 34
Project: minecraft-quiverbow   File: OSR.java   View source code 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 + "Splints: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Splints: " + ammo + " / " + this.getMaxDamage());
	}

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

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

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

	list.add(EnumChatFormatting.YELLOW + "Crouch-use to drop the current magazine.");
	list.add(EnumChatFormatting.YELLOW + "Craft with 1 Obsidian Magazine to");
	list.add(EnumChatFormatting.YELLOW + "reload when empty.");

	list.add("Deceptively cold to the touch.");

	if (this.getCooldown(stack) > 0)
	{
		list.add(EnumChatFormatting.RED + "COOLING DOWN (" + this.displayInSec(this.getCooldown(stack)) + " sec)");
	}
}
 
Example 35
Project: minecraft-quiverbow   File: NeedleMagazine.java   View source code 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 36
Project: minecraft-quiverbow   File: EnderBow.java   View source code 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 37
Project: minecraft-quiverbow   File: RedstoneMagazine.java   View source code 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 38
Project: minecraft-quiverbow   File: LapisMagazine.java   View source code 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 39
Project: ExtraAcC   File: SandStorm.java   View source code 5 votes vote down vote up
@Listener(channel=MSG_PERFORM, side=Side.SERVER)
public void s_perform()  {
	if(consume()) {
		tick_shot();		
		ctx.addSkillExp(getExpIncr());
	}
}
 
Example 40
Project: minecraft-quiverbow   File: Potatosser.java   View source code 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 + "Potatoes: INFINITE / " + this.getMaxDamage());
	}
	else
	{
		int ammo = this.getMaxDamage() - this.getDamage(stack);
		list.add(EnumChatFormatting.BLUE + "Potatoes: " + ammo + " / " + this.getMaxDamage());
	}

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

	list.add(EnumChatFormatting.GREEN + "Missed potatoes are edible.");

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

	list.add(EnumChatFormatting.YELLOW + "Craft with up to 7 Potatoes and");
	list.add(EnumChatFormatting.YELLOW + "1 Coal/Charcoal to reload.");

	list.add("It smells kinda appetizing.");

	int cool = this.getCooldown(stack);

	if (cool > 0) { list.add(EnumChatFormatting.RED + "COOKING (" + cool + ")"); }
}