Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentTranslation


    }

    //Couple of helpers because the mcp names are stupid and long...
    private ChatComponentTranslation format(EnumChatFormatting color, String str, Object... args)
    {
        ChatComponentTranslation ret = new ChatComponentTranslation(str, args);
        ret.getChatStyle().setColor(color);
        return ret;
    }
View Full Code Here


                if (Tessellator.class.getPackage().getName().startsWith("net.minecraft."))
                {
                    Minecraft mc = FMLClientHandler.instance().getClient();
                    if (mc.ingameGUI != null)
                    {
                        mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("forge.texture.preload.warning", texture));
                    }
                }
            }
        }
    }
View Full Code Here

     
      if (tile.getOwnerProfile() != null)
        ownerName = tile.getOwnerProfile().getName();


      player.addChatMessage(new ChatComponentTranslation("for.chat.accesslocked",ownerName));
    }
    return true;
  }
View Full Code Here

      String ownerName = StringUtil.localize("gui.derelict");
     
      if (tile.getOwnerProfile() != null)
        ownerName = tile.getOwnerProfile().getName();

      player.addChatMessage(new ChatComponentTranslation("for.chat.accesslocked",ownerName));
    }
    return true;
  }
View Full Code Here

    // Handle letter sending
    if (PostManager.postRegistry.isLetter(held)) {
      IPostalState result = this.tryDispatchLetter(held, true);
      if (!result.isOk())
        player.addChatMessage(new ChatComponentTranslation("for.chat.mail." + result.getIdentifier()));
      else
        held.stackSize--;
    } else
      player.openGui(ForestryAPI.instance, GuiId.MailboxGUI.ordinal(), player.worldObj, xCoord, yCoord, zCoord);
  }
View Full Code Here

    if (Proxies.common.isSimulating(world))
      if (itemstack.stackSize == 1) {
        entityplayer.openGui(ForestryAPI.instance, GuiId.LetterGUI.ordinal(), world, (int) entityplayer.posX, (int) entityplayer.posY,
            (int) entityplayer.posZ);
      } else {
        entityplayer.addChatMessage(new ChatComponentTranslation("for.chat.mail.wrongstacksize"));
      }

    return itemstack;
  }
View Full Code Here

    EntityLivingBase other = living.func_94060_bK();
    String ssp = "death." + this.damageType;
    String smp = ssp + ".player";

    if (other != null) {
      return new ChatComponentTranslation(smp, living.func_145748_c_(), other.func_145748_c_());
    } else {
      return new ChatComponentTranslation(ssp, living.func_145748_c_());
    }
  }
View Full Code Here

    IHUDConfig config = new HUDConfig(player.inventory.getStackInSlot(slot));
    switch(buttonId) {
      case 0:
        config.setHUDChassie(state);
        if(config.isHUDChassie()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.chassie.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.chassie.disabled"));
        }
        break;
      case 1:
        config.setHUDCrafting(state);
        if(config.isHUDCrafting()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.crafting.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.crafting.disabled"));
        }
        break;
      case 2:
        config.setHUDInvSysCon(state);
        if(config.isHUDInvSysCon()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.invsyscon.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.invsyscon.disabled"));
        }
        break;
      case 3:
        config.setHUDPowerJunction(state);
        if(config.isHUDPowerLevel()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.powerjunction.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.powerjunction.disabled"));
        }
        break;
      case 4:
        config.setHUDProvider(state);
        if(config.isHUDProvider()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.provider.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.provider.disabled"));
        }
        break;
      case 5:
        config.setHUDSatellite(state);
        if(config.isHUDSatellite()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.satellite.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.satellite.disabled"));
        }
        break;
    }
    if(player.inventoryContainer != null) {
      player.inventoryContainer.detectAndSendChanges();
View Full Code Here

    if (SimpleServiceLocator.toolWrenchHandler.isWrenchEquipped(entityplayer) && entityplayer.isSneaking() && SimpleServiceLocator.toolWrenchHandler.canWrench(entityplayer, this.getX(), this.getY(), this.getZ())) {
      if(MainProxy.isServer(getWorld())) {
        if (settings == null || settings.openGui) {
          ((PipeLogisticsChassi)this.container.pipe).nextOrientation();
        } else {
          entityplayer.addChatComponentMessage(new ChatComponentTranslation("lp.chat.permissiondenied"));
        }
      }
      SimpleServiceLocator.toolWrenchHandler.wrenchUsed(entityplayer, this.getX(), this.getY(), this.getZ());
      return true;
    }
   
    if(!entityplayer.isSneaking() && entityplayer.getCurrentEquippedItem().getItem() == LogisticsPipes.ModuleItem && entityplayer.getCurrentEquippedItem().getItemDamage() != ItemModule.BLANK) {
      if(MainProxy.isServer(getWorld())) {
        if (settings == null || settings.openGui) {
          return tryInsertingModule(entityplayer);
        } else {
          entityplayer.addChatComponentMessage(new ChatComponentTranslation("lp.chat.permissiondenied"));
        }
      }
      return true;
    }
View Full Code Here

        final TileEntity tile = event.entityPlayer.worldObj.getTileEntity(event.x, event.y, event.z);
        if(tile instanceof LogisticsTileGenericPipe) {
          if(((LogisticsTileGenericPipe)tile).pipe instanceof CoreRoutedPipe) {
            if(!((CoreRoutedPipe)((LogisticsTileGenericPipe)tile).pipe).canBeDestroyedByPlayer(event.entityPlayer)) {
              event.setCanceled(true);
              event.entityPlayer.addChatComponentMessage(new ChatComponentTranslation("lp.chat.permissiondenied"));
              ((LogisticsTileGenericPipe)tile).scheduleNeighborChange();
              event.entityPlayer.worldObj.markBlockForUpdate(tile.xCoord, tile.yCoord, tile.zCoord);
              ((CoreRoutedPipe)((LogisticsTileGenericPipe)tile).pipe).delayTo = System.currentTimeMillis() + 200;
              ((CoreRoutedPipe)((LogisticsTileGenericPipe)tile).pipe).repeatFor = 10;
            } else {
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.