本文整理汇总了Java中cpw.mods.fml.relauncher.Side类的典型用法代码示例。如果您正苦于以下问题:Java Side类的具体用法?Java Side怎么用?Java Side使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Side类属于cpw.mods.fml.relauncher包,在下文中一共展示了Side类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setVelocity
import cpw.mods.fml.relauncher.Side; //导入依赖的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;
}
}
示例2: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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.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.");
}
示例3: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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 + "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.");
}
示例4: preInit
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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);
}
示例5: getSunBrightness
import cpw.mods.fml.relauncher.Side; //导入依赖的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;
}
示例6: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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 + "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.");
}
示例7: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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.");
}
示例8: s_perform
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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();
}
示例9: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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()));
}
}
}
示例10: shouldSideBeRendered
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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;
}
示例11: registerIcons
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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");
}
示例12: preInit
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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;
}
}
示例13: addInformation
import cpw.mods.fml.relauncher.Side; //导入依赖的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.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.");
}
示例14: getSubItems
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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);
}
示例15: registerIcons
import cpw.mods.fml.relauncher.Side; //导入依赖的package包/类
@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");
}