Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentText


            if (entityLiving instanceof EntityPlayer)
            {
                if (!world.isRemote)
                {
                    ((EntityPlayer) entityLiving).addChatMessage(new ChatComponentText(EnumColor.RED + GCCoreUtil.translate("gui.warning.noroom")));
                }
                ((EntityPlayer) entityLiving).inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(this), 1, 0));
            }

            return;
View Full Code Here


            {
                if (entityLiving instanceof EntityPlayer)
                {
                    if (!world.isRemote)
                    {
                        ((EntityPlayer) entityLiving).addChatMessage(new ChatComponentText(EnumColor.RED + GCCoreUtil.translate("gui.warning.noroom")));
                    }

                    world.setBlockToAir(x, y, z);
                    ((EntityPlayer) entityLiving).inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(MarsBlocks.machine), 1, BlockMachineMars.CRYOGENIC_CHAMBER_METADATA));
                    return;
View Full Code Here

                        if (par1EntityPlayer instanceof EntityPlayerMP)
                        {
                            GCPlayerStats stats = GCPlayerStats.get((EntityPlayerMP) par1EntityPlayer);
                            if (stats.chatCooldown == 0)
                            {
                                par1EntityPlayer.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.slimeling.chat.wrongPlayer")));
                                stats.chatCooldown = 100;
                            }
                        }
                    }
                }
View Full Code Here

        case OK:
            ((EntityPlayerMP) entityPlayer).playerNetServerHandler.setPlayerLocation(entityPlayer.posX, entityPlayer.posY, entityPlayer.posZ, entityPlayer.rotationYaw, entityPlayer.rotationPitch);
            GalacticraftCore.packetPipeline.sendTo(new PacketSimpleMars(EnumSimplePacketMars.C_BEGIN_CRYOGENIC_SLEEP, new Object[] { this.xCoord, this.yCoord, this.zCoord }), (EntityPlayerMP) entityPlayer);
            return true;
        case NOT_POSSIBLE_NOW:
            entityPlayer.addChatMessage(new ChatComponentText(GCCoreUtil.translateWithFormat("gui.cryogenic.chat.cantUse", GCPlayerStats.get((EntityPlayerMP) entityPlayer).cryogenicChamberCooldown / 20)));
            return false;
        default:
            return false;
        }
    }
View Full Code Here

        EntityPlayerMP playerBase = PlayerUtil.getPlayerBaseServerFromPlayer(player, false);
        GCPlayerStats stats = GCPlayerStats.get(playerBase);

        if (playerBase == null)
        {
            player.addChatMessage(new ChatComponentText("Galacticraft player instance null server-side. This is a bug."));
            return null;
        }

        if (ID == GuiIdsCore.ROCKET_INVENTORY && player.ridingEntity instanceof EntityTieredRocket)
        {
View Full Code Here

              NBTTagCompound fmData = held.stackTagCompound;
              if (fmData != null && fmData.hasKey("linkedUUIDMost") && fmData.hasKey("linkedUUIDLeast"))
              {
                UUID uuid = new UUID(fmData.getLong("linkedUUIDMost"), fmData.getLong("linkedUUIDLeast"));
                ((TileEntityTelemetry) tile).addTrackedEntity(uuid);
                  player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.telemetrySucceed.message")));
              }
              else
              {
                  player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.telemetryFail.message")));

                if (fmData == null)
                  {
                    fmData = new NBTTagCompound();
                    held.setTagCompound(fmData);
                  }
              }
              fmData.setInteger("teCoordX", x);
              fmData.setInteger("teCoordY", y);
              fmData.setInteger("teCoordZ", z);
              fmData.setInteger("teDim", world.provider.dimensionId);
              return true;
            }

            ItemStack wearing = GCPlayerStats.get((EntityPlayerMP)player).frequencyModuleInSlot;
            if (wearing != null)
            {
              if (wearing.hasTagCompound() && wearing.getTagCompound().hasKey("teDim")) return false;
              player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.telemetryFailWearingIt.message")));
            }
            else
              player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.telemetryFailNoFrequencyModule.message")));
          }
        }
      return false;
    }
View Full Code Here

                                case -1:
                                    for (EntityLivingBase e : containedEntities)
                                    {
                                        if (e instanceof EntityPlayer)
                                        {
                                            ((EntityPlayer) e).addChatComponentMessage(new ChatComponentText("Cannot Send client-side")); // No need for translation, since this should never happen
                                        }
                                    }
                                    break;
                                case 1:
                                    for (EntityLivingBase e : containedEntities)
                                    {
                                        if (e instanceof EntityPlayer)
                                        {
                                            ((EntityPlayer) e).addChatComponentMessage(new ChatComponentText("Target address invalid")); // No need for translation, since this should never happen
                                        }
                                    }
                                    break;
                                case 2:
                                    for (EntityLivingBase e : containedEntities)
                                    {
                                        if (e instanceof EntityPlayer)
                                        {
                                            ((EntityPlayer) e).addChatComponentMessage(new ChatComponentText(GCCoreUtil.translate("gui.message.targetNoEnergy.name")));
                                        }
                                    }
                                    break;
                                }
                            }
View Full Code Here

                        {
                            Thread.sleep(5000);

                            if (sideToCheck.equals(Side.CLIENT))
                            {
                                FMLClientHandler.instance().getClient().thePlayer.addChatMessage(new ChatComponentText(EnumColor.GREY + "New " + EnumColor.DARK_AQUA + "Galacticraft" + EnumColor.GREY + " version available! v" + String.valueOf(remoteMajVer) + "." + String.valueOf(remoteMinVer) + "." + String.valueOf(remoteBuildVer) + EnumColor.DARK_BLUE + " http://micdoodle8.com/"));
                            }
                            else if (sideToCheck.equals(Side.SERVER))
                            {
                                GCLog.severe("New Galacticraft version available! v" + String.valueOf(remoteMajVer) + "." + String.valueOf(remoteMinVer) + "." + String.valueOf(remoteBuildVer) + " http://micdoodle8.com/");
                            }
View Full Code Here

            {
                par3EntityPlayer.inventory.consumeInventoryItem(Items.string);
            }
        }
        else if (par2World.isRemote)
             par3EntityPlayer.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.message.grapple.fail")));
    }
View Full Code Here

        }

         itemStack.stackTagCompound.setLong("linkedUUIDMost", entity.getUniqueID().getMostSignificantBits());
         itemStack.stackTagCompound.setLong("linkedUUIDLeast", entity.getUniqueID().getLeastSignificantBits());

        player.addChatMessage(new ChatComponentText(GCCoreUtil.translate("gui.tracking.message")));
        return true;
      }
      return false;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChatComponentText

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.