Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentTranslation


        }
        player.openGui(EnderIO.instance, GuiHandler.GUI_ID_ENDERFACE, world, target.x,
            TravelController.instance.selectedCoord.y, TravelController.instance.selectedCoord.z);
      }
    } else {
      player.addChatComponentMessage(new ChatComponentTranslation("enderio.gui.travelAccessable.unauthorised"));
    }
  }
View Full Code Here


    if(source != TravelSource.STAFF_BLINK) {
      TileEntity te = player.worldObj.getTileEntity(coord.x, coord.y, coord.z);
      if(te instanceof ITravelAccessable) {
        ITravelAccessable ta = (ITravelAccessable) te;
        if(!ta.canBlockBeAccessed(player)) {
          player.addChatComponentMessage(new ChatComponentTranslation("enderio.gui.travelAccessable.unauthorised"));
          return false;
        }
      }
    }

    int requiredPower = 0;
    requiredPower = getRequiredPower(player, source, coord);
    if(requiredPower < 0) {
      return false;
    }

    if(!isInRangeTarget(player, coord, source.maxDistanceTravelledSq)) {
      if(source != TravelSource.STAFF_BLINK) {
        player.addChatComponentMessage(new ChatComponentTranslation("enderio.blockTravelPlatform.outOfRange"));
      }
      return false;
    }
    if(!isValidTarget(player, coord, source)) {
      if(source != TravelSource.STAFF_BLINK) {
        player.addChatComponentMessage(new ChatComponentTranslation("enderio.blockTravelPlatform.invalidTarget"));
      }
      return false;
    }
    sendTravelEvent(coord, source, requiredPower, conserveMomentum);
    for (int i = 0; i < 6; ++i) {
View Full Code Here

    int requiredPower;
    ItemStack staff = player.getCurrentEquippedItem();
    requiredPower = (int) (getDistance(player, coord) * source.powerCostPerBlockTraveledRF);
    int canUsePower = getEnergyInTravelItem(staff);
    if(requiredPower > canUsePower) {
      player.addChatComponentMessage(new ChatComponentTranslation("enderio.itemTravelStaff.notEnoughPower"));
      return -1;
    }
    return requiredPower;
  }
View Full Code Here

      if(amulet != null && amulet.getItem() == this) {
        event.setCanceled(true);
        player.setHealth(player.getMaxHealth());
        player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300, 6));
        player.addChatMessage(new ChatComponentTranslation("botaniamisc.savedByLaurel"));
        player.worldObj.playSoundAtEntity(player, "botania:goldenLaurel", 1F, 0.3F);
        PlayerHandler.getPlayerBaubles(player).setInventorySlotContents(0, null);
      }
    }
  }
View Full Code Here

                }

                counter -= ConfigurationBackpack.MAX_BACKPACK_AMOUNT;
                if(counter > 0) {
                    IChatComponent message = new ChatComponentText("[Backpacks] ");
                    message.appendSibling(new ChatComponentTranslation(Localizations.MESSAGE_ALLOWED_BACKPACKS, ConfigurationBackpack.MAX_BACKPACK_AMOUNT));
                    player.addChatMessage(message);
                    message = new ChatComponentText("[Backpacks] ").appendSibling(new ChatComponentTranslation(Localizations.MESSAGE_DROPPED_BACKPACKS, counter));
                    player.addChatMessage(message);
                }
            }
        }
    }
View Full Code Here

  public static boolean spawn(EntityPlayer player, ItemStack par1ItemStack, World par3World, int par4, int par5, int par6) {
    Block block = par3World.getBlock(par4, par5, par6);
    if(block == Blocks.beacon && !par3World.isRemote) {
      if(par3World.difficultySetting == EnumDifficulty.PEACEFUL) {
        player.addChatMessage(new ChatComponentTranslation("botaniamisc.peacefulNoob").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
        return false;
      }

      for(int[] coords : PYLON_LOCATIONS) {
        int x = par4 + coords[0];
        int y = par5 + coords[1];
        int z = par6 + coords[2];

        Block blockat = par3World.getBlock(x, y, z);
        int meta = par3World.getBlockMetadata(x, y, z);
        if(blockat != ModBlocks.pylon || meta != 2) {
          player.addChatMessage(new ChatComponentTranslation("botaniamisc.needsCatalysts").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
          return false;
        }
      }

      par1ItemStack.stackSize--;
View Full Code Here

    String force = getForcedPage(par1ItemStack);
    if(force != null && !force.isEmpty()) {
      LexiconEntry entry = getEntryFromForce(par1ItemStack);
      if(entry != null)
        Botania.proxy.setEntryToOpen(entry);
      else par3EntityPlayer.addChatMessage(new ChatComponentTranslation("botaniamisc.cantOpen").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
      setForcedPage(par1ItemStack, "");
    }

    par3EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par2World, 0, 0, 0);
    if(!par2World.isRemote && !skipSound)
View Full Code Here

      }
    } else if(enchanter.stage == 0) {
      if(par5EntityPlayer.inventory.addItemStackToInventory(enchanter.itemToEnchant.copy())) {
        enchanter.itemToEnchant = null;
        enchanter.sync();
      } else par5EntityPlayer.addChatMessage(new ChatComponentTranslation("botaniamisc.invFull"));
    }

    return true;
  }
View Full Code Here

      if(!onlineVersion.isEmpty()) {
        EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        int onlineBuild = Integer.parseInt(onlineVersion.split("-")[1]);
        int clientBuild = LibMisc.BUILD.contains("GRADLE") ? Integer.MAX_VALUE : Integer.parseInt(LibMisc.BUILD);
        if(onlineBuild > clientBuild) {
          player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.flavour" + player.worldObj.rand.nextInt(FLAVOUR_MESSAGES)).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
          player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.outdated", clientBuild, onlineBuild));

          IChatComponent component = IChatComponent.Serializer.func_150699_a(StatCollector.translateToLocal("botania.versioning.updateMessage").replaceAll("%version%", onlineVersion));
          player.addChatComponentMessage(component);
        }
      }
View Full Code Here

        buffer = new byte[10240];
        totalBytesDownloaded += bytesJustDownloaded;
      }

      if(Minecraft.getMinecraft().thePlayer != null)
        Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation("botania.versioning.doneDownloading", fileName).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)));

      Desktop.getDesktop().open(dir);
      VersionChecker.downloadedFile = true;

      outputStream.close();
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChatComponentTranslation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.