当前位置: 首页>>代码示例>>Java>>正文


Java SideOnly类代码示例

本文整理汇总了Java中cpw.mods.fml.relauncher.SideOnly的典型用法代码示例。如果您正苦于以下问题:Java SideOnly类的具体用法?Java SideOnly怎么用?Java SideOnly使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SideOnly类属于cpw.mods.fml.relauncher包,在下文中一共展示了SideOnly类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onMessage

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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;
    
}
 
开发者ID:Pishka,项目名称:MineDonate,代码行数:22,代码来源:SupportedFeaturesPacketHandler.java

示例2: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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) + ")"); }
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:26,代码来源:Crossbow_Double.java

示例3: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:24,代码来源:Crossbow_Auto.java

示例4: setVelocity

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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;
    }
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:19,代码来源:_ProjectileBase.java

示例5: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:24,代码来源:DragonBox.java

示例6: getSunBrightness

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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;
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:17,代码来源:WorldProviderTrappistOneB.java

示例7: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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()));
		}
	}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:20,代码来源:ItemBanner.java

示例8: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
   }
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:17,代码来源:EnderBow.java

示例9: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:25,代码来源:SilkenSpinner.java

示例10: initializeBannerData

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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;
					}
				}
		}
}
 
开发者ID:jm-organization,项目名称:connor41-etfuturum2,代码行数:27,代码来源:TileEntityBanner.java

示例11: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
   }
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:25,代码来源:Sunray.java

示例12: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:25,代码来源:MediGun.java

示例13: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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.");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:26,代码来源:PowderKnuckle.java

示例14: addInformation

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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);
}
 
开发者ID:SihenZhang,项目名称:CursedLasso,代码行数:12,代码来源:ItemCursedLasso.java

示例15: registerIcons

import cpw.mods.fml.relauncher.SideOnly; //导入依赖的package包/类
@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");
}
 
开发者ID:Domochevsky,项目名称:minecraft-quiverbow,代码行数:8,代码来源:EnderRifle.java


注:本文中的cpw.mods.fml.relauncher.SideOnly类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。