Package net.minecraft.util

Examples of net.minecraft.util.ChatComponentTranslation


    if (par3EntityPlayer.isSneaking() && !par2World.isRemote) {
      if (stack.stackTagCompound == null) {
        stack.stackTagCompound = new NBTTagCompound();
      }
      if (stack.stackTagCompound.getInteger("Activated") == 0) {
        par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.bloodSword.activateEssentiaHarvest"));
        stack.stackTagCompound.setInteger("Activated", 1);
      } else {
        par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.bloodSword.deactivateEssentiaHarvest"));
        stack.stackTagCompound.setInteger("Activated", 0);
      }
    }
    return cache;
  }
View Full Code Here


    String name = getPlayerName(par1ItemStack);
    if (name.endsWith(NON_ASIGNED)) {
      setPlayerName(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
      setPlayerResearch(par1ItemStack, par3EntityPlayer.getGameProfile().getName());
      if (!par2World.isRemote)
        par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.write"));
    } else sync:{
      List<String> researchesDone = ResearchManager.getResearchForPlayer(name);

      if (researchesDone == null) {
        if (par2World.isRemote)
          researchesDone = getPlayerResearch(par1ItemStack);
        else {
          par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
          break sync;

        }
      }

      for (String key : researchesDone)
        ThaumicTinkerer.tcProxy.getResearchManager().completeResearch(par3EntityPlayer, key);

      if (!par2World.isRemote)
        par3EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.shareTome.sync"));
    }

    return par1ItemStack;
  }
View Full Code Here

        if (par3World.isRemote)
          par2EntityPlayer.swingItem();

        playSound(par3World, par4, par5, par6);
        if (tile instanceof TileTransvector)
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.set"));
        else
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.golemconnector.set"));
      } else
        par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.notinterf"));
    } else {
      int x = getX(par1ItemStack);
      int y = getY(par1ItemStack);
      int z = getZ(par1ItemStack);

      TileEntity tile1 = par3World.getTileEntity(x, y, z);
      if (tile1 == null || !(tile1 instanceof TileTransvector)) {
        setY(par1ItemStack, -1);

        par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.notpresent"));
      } else {
        TileTransvector trans = (TileTransvector) tile1;

        if (tile != null && tile1 instanceof TileTransvectorInterface && tile instanceof TileTransvectorInterface) {
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.interffail"));
          return true;
        }

        if (Math.abs(x - par4) > trans.getMaxDistance() || Math.abs(y - par5) > trans.getMaxDistance() || Math.abs(z - par6) > trans.getMaxDistance()) {
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.toofar"));
          return true;
        }

        trans.x = par4;
        trans.y = par5;
        trans.z = par6;

        setY(par1ItemStack, -1);

        playSound(par3World, par4, par5, par6);
        par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.connector.complete"));
        par3World.markBlockForUpdate(trans.x, trans.y, trans.z);
      }
    }

    return true;
View Full Code Here

        if (getY(par1ItemStack) == -1) {
          if (par3EntityLivingBase.worldObj.isRemote) {
            return false;
          }
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.golemconnector.notinterf"));
          return true;
        }
        int x = getX(par1ItemStack);
        int y = getY(par1ItemStack);
        int z = getZ(par1ItemStack);
        TileEntity tile1 = par2EntityPlayer.worldObj.getTileEntity(x, y, z);
        if (tile1 == null || !(tile1 instanceof TileGolemConnector)) {
          setY(par1ItemStack, -1);
          if (par3EntityLivingBase.worldObj.isRemote) {
            return false;
          }
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.golemconnector.notpresent"));
          return false;
        } else {
          if (par3EntityLivingBase.worldObj.isRemote) {
            par2EntityPlayer.swingItem();
            return false;
          }
          TileGolemConnector trans = (TileGolemConnector) tile1;

          trans.ConnectGolem(par3EntityLivingBase.getUniqueID());

          setY(par1ItemStack, -1);

          playSound(par3EntityLivingBase.worldObj, (int) par3EntityLivingBase.posX, (int) par3EntityLivingBase.posY, (int) par3EntityLivingBase.posZ);
          par2EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.golemconnector.complete"));
          par2EntityPlayer.worldObj.markBlockForUpdate(trans.xCoord, trans.yCoord, trans.zCoord);
        }
        return true;
      }
    }
View Full Code Here

          ThaumicTinkerer.tcProxy.sparkle((float) player.posX + player.worldObj.rand.nextFloat() - 0.5F, (float) player.posY + player.worldObj.rand.nextFloat(), (float) player.posZ + player.worldObj.rand.nextFloat() - 0.5F, 6);

        player.worldObj.playSoundAtEntity(player, "thaumcraft:wand", 1F, 0.1F);
        return true;
      } else if (!player.worldObj.isRemote)
        player.addChatMessage(new ChatComponentTranslation("ttmisc.noTeleport"));
    } else if (!player.worldObj.isRemote)
      player.addChatMessage(new ChatComponentTranslation("ttmisc.noDest"));

    return false;
  }
View Full Code Here

          boolean activated = (meta & 8) != 0;
          if (!activated && !tablet.getIsBreaking() && tablet.swingProgress == 0) {
            par1World.setBlockMetadataWithNotify(par2, par3, par4, meta == 5 ? 2 : meta + 1, 1 | 2);
            par1World.playSoundEffect(par2, par3, par4, "thaumcraft:tool", 0.6F, 1F);
          } else
            par5EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.animationTablet.notRotatable"));
          // Rare chance this might happen, but better to cope for it.

          return true;
        } else {
          //if(tablet.Owner==null || tablet.Owner.equals(""))
View Full Code Here

      if(isSpeedActive) {
        message = Lang.localize("darksteel.upgrade.speed.enabled");
      } else {
        message = Lang.localize("darksteel.upgrade.speed.disabled");
      }
      Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation(message));
      DarkSteelController.instance.setSpeedActive(Minecraft.getMinecraft().thePlayer, isSpeedActive);
      PacketHandler.INSTANCE.sendToServer(new PacketUpgradeState(PacketUpgradeState.Type.SPEED, isSpeedActive));
    }
  }
View Full Code Here

      if(isStepAssistActive) {
        message = Lang.localize("darksteel.upgrade.stepAssist.enabled");
      } else {
        message = Lang.localize("darksteel.upgrade.stepAssist.disabled");
      }
      Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation(message));
      DarkSteelController.instance.setStepAssistActive(Minecraft.getMinecraft().thePlayer, isStepAssistActive);
      PacketHandler.INSTANCE.sendToServer(new PacketUpgradeState(PacketUpgradeState.Type.STEP_ASSIST, isStepAssistActive));
    }
   
  }
View Full Code Here

      if(isSoundDectorActive) {
        message = Lang.localize("darksteel.upgrade.sound.enabled");
      } else {
        message = Lang.localize("darksteel.upgrade.sound.disabled");
      }
      Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation(message));
      SoundDetector.instance.setEnabled(isSoundDectorActive);
    }
   
  }
View Full Code Here

      if(isGlideActive) {
        message = Lang.localize("darksteel.upgrade.glider.enabled");
      } else {
        message = Lang.localize("darksteel.upgrade.glider.disabled");
      }
      Minecraft.getMinecraft().thePlayer.addChatComponentMessage(new ChatComponentTranslation(message));
      DarkSteelController.instance.setGlideActive(Minecraft.getMinecraft().thePlayer, isGlideActive);
      PacketHandler.INSTANCE.sendToServer(new PacketUpgradeState(PacketUpgradeState.Type.GLIDE, isGlideActive));
    }
  }
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.