@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; }
@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) + ")"); } }
@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."); }
@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; } }
@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."); }
@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; }
@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())); } } }
@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."); }
@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."); }
@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; } } } }
@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."); }
@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."); }
@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."); }
@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); }
@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"); }
@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)); } }
@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"); }
@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); } }
@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"); }
@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() )); }
@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"); }
@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); }
@Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister iconRegister) { this.itemIcon = iconRegister.registerIcon(texturePath); }
@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"); }
@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."); }
@SideOnly(Side.CLIENT) @Override public void registerIcons(IIconRegister par1IconRegister) { Icon = par1IconRegister.registerIcon("quiverchevsky:ammo/EnderAmmo"); Icon_Empty = par1IconRegister.registerIcon("quiverchevsky:ammo/EnderAmmo_Empty"); }
@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); }
@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; }
@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"); }
@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"); }
@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"); }
@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!"); }
@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 }
@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"); }
@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())); }
@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"); }
/** * 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; }
@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"); }
@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"); }