Package net.minecraft.src

Examples of net.minecraft.src.EntityPlayer


 
  public void updateEntity()
  {
    super.updateEntity();
    if (mod_CraftingTableIII.EnableDoor) {
      EntityPlayer entityplayer = worldObj.getClosestPlayer((float)xCoord + 0.5F, (float)yCoord + 0.5F, (float)zCoord + 0.5F, 10D);
      if(entityplayer != null){
        playerDistance = entityplayer.getDistanceSq((double)xCoord, (double)yCoord, (double)zCoord);
        if(playerDistance < 7F){
          doorAngle += openspeed;
         
          if(tablestate != 1) {
            tablestate = 1;
View Full Code Here


   /**
    * @see com.sijobe.spc.wrapper.CommandBase#execute(com.sijobe.spc.wrapper.CommandSender, java.util.List)
    */
   @Override
   public void execute(CommandSender sender, List<?> params) throws CommandException {
      EntityPlayer player = getSenderAsPlayer(sender).getMinecraftPlayer();
      player.displayGUIChest(player.getInventoryEnderChest());
   }
View Full Code Here

    Entity e = SpoutClient.getInstance().getEntityFromId(entityId);
    if (e != null && e instanceof EntityLivingBase) {
      CraftLivingEntity living = (CraftLivingEntity)e.spoutEnty;
      // Check to see if this title is our username, if so, use defaults
      if (e instanceof EntityPlayer) {
        EntityPlayer player = (EntityPlayer)e;
        if (player.vip != null && title.equals(player.username)) {
          title = player.vip.getTitle();
        }
      }
      if (title.equals("reset")) {
View Full Code Here

    }
    output.writeInt(volume);
  }

  public void run(int entityId) {
    EntityPlayer e = SpoutClient.getInstance().getPlayerFromId(entityId);
    if (e != null) {
        SoundManager sndManager = SpoutClient.getHandle().sndManager;
        if (soundId > -1 && soundId <= SoundEffect.getMaxId()) {
          SoundEffect effect = SoundEffect.getSoundEffectFromId(soundId);
          if (!location) {
View Full Code Here

      return false;
    }
    if ((damagesource.getSourceOfDamage() instanceof EntityPlayer)
        || damagesource == DamageSource.explosion) {
      if (damagesource.getSourceOfDamage() instanceof EntityPlayer) {
        EntityPlayer p = (EntityPlayer) damagesource
            .getSourceOfDamage();
        if (p.inventory.getCurrentItem() != null)
          if (p.inventory.getCurrentItem().itemID == Weapons.swords
              .get(0).shiftedIndex)
            i = Weapons.swords.get(0).getDamageVsEntity(this);
View Full Code Here

      fp.arrowCritical = true;
    if (ep != null)
      itemstack.damageItem(4 * (int) f, ep);
    world.spawnEntityInWorld(fp);
    if (ep instanceof EntityPlayer) {
      EntityPlayer p = (EntityPlayer) ep;
    }
  }
View Full Code Here

    Item icespike = new ItemStaff(mod_Dragon.LAST_ID++, "Ice Spike", Block.ice.blockID, false) {
      public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityLiving e) {
        // ep.setItemInUse(itemstack, getMaxItemUseDuration(itemstack));
        if (!(e instanceof EntityPlayer))
          return itemstack;
        EntityPlayer ep = (EntityPlayer) e;
        float f = 1.0F;
        double d = ep.prevPosX + (ep.posX - ep.prevPosX) * (double) f;
        double d1 = (ep.prevPosY + (ep.posY - ep.prevPosY) * (double) f + 1.62D)
            - (double) ep.yOffset;
        double d2 = ep.prevPosZ + (ep.posZ - ep.prevPosZ) * (double) f;
        boolean flag = false;
        MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(
            world, ep, flag);

        if (movingobjectposition == null)
          return itemstack;
        if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE) {
          int i = movingobjectposition.blockX;
          int j = movingobjectposition.blockY;
          int k = movingobjectposition.blockZ;
          if (movingobjectposition.sideHit == 0)
            j--;
          if (movingobjectposition.sideHit == 1)
            j++;
          if (movingobjectposition.sideHit == 2)
            k--;
          if (movingobjectposition.sideHit == 3)
            k++;
          if (movingobjectposition.sideHit == 4)
            i--;
          if (movingobjectposition.sideHit == 5)
            i++;
          if (!ep.canPlayerEdit(i, j, k))
            return itemstack;
          if (world.isAirBlock(i, j, k) || !world.getBlockMaterial(i, j, k).isSolid())
            Magic.Destruction.icespike(world, i, j, k);
        }
        return itemstack;
View Full Code Here

    GL11.glLoadIdentity();
    GL11.glTranslatef(0.0F, 0.0F, -2000F);
  }

  public void update() {
    EntityPlayer p = ModLoader.getMinecraftInstance().thePlayer;
    World world = p.worldObj;
    Location loc = new Location((int) p.posX, (int) p.posY, (int) p.posZ);
    if (mod_Dragon.holdManager == null || mod_Dragon.holdManager.world != world)

      mod_Dragon.holdManager = new HoldManager(world);
View Full Code Here

TOP

Related Classes of net.minecraft.src.EntityPlayer

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.