當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。