Package net.minecraft.server.v1_7_R3

Examples of net.minecraft.server.v1_7_R3.Block


    }
  }

  @Override
  public double getFasterMovementAmplifier(final Player player) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
    if (mcPlayer.hasEffect(MobEffectList.FASTER_MOVEMENT)) {
      return mcPlayer.getEffect(MobEffectList.FASTER_MOVEMENT).getAmplifier();
    }
    else {
      return Double.NEGATIVE_INFINITY;
    }
  }
View Full Code Here


    return ((CraftEntity) entity).getHandle() instanceof EntityComplexPart;
  }

  @Override
  public boolean shouldBeZombie(final Player player) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
    return !mcPlayer.dead && mcPlayer.getHealth() <= 0.0f ;
  }
View Full Code Here

    return !mcPlayer.dead && mcPlayer.getHealth() <= 0.0f ;
  }

  @Override
  public void setDead(final Player player, final int deathTicks) {
    final EntityPlayer mcPlayer = ((CraftPlayer) player).getHandle();
        mcPlayer.deathTicks = deathTicks;
        mcPlayer.dead = true;
  }
View Full Code Here

    }

    @Override
    public void handlePacket(Object packet, Player destination) throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
        if (packet instanceof PacketPlayOutNamedEntitySpawn) {
            final PacketPlayOutNamedEntitySpawn p = (PacketPlayOutNamedEntitySpawn) packet;
            final GameProfile profile = (GameProfile) this.gameProfileField.get(p);
            final String oldName = profile.getName();
            final UUID oldID = profile.getId();
            final TagInfo newName = this.handler.getNameForPacket20(oldID, this.entityIDField.getInt(p), oldName, destination);
            if (newName != null && !newName.getName().equals(oldName)) {
View Full Code Here

    } else return entityHeight;
  }

  @Override
  public AlmostBoolean isBlockSolid(final int id) {
    final Block block = Block.getById(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isSolid());
    }
  }
View Full Code Here

    }
  }

  @Override
  public AlmostBoolean isBlockLiquid(final int id) {
    final Block block = Block.getById(id);
    if (block == null || block.getMaterial() == null) {
      return AlmostBoolean.MAYBE;
    }
    else {
      return AlmostBoolean.match(block.getMaterial().isLiquid());
    }
  }
View Full Code Here

    {
        // Try parsing as an internal Minecraft name
        // This is so that things like "minecraft:stone" aren't parsed
        // as the block "minecraft" with data "stone", but instead as the
        // block "minecraft:stone" with no block data.
        Block block = Block.b(input);
        if (block != null)
        {
            return BukkitMaterialData.ofMinecraftBlock(block, 0);
        }
View Full Code Here

            blockName = input.substring(0, splitIndex);
            blockData = Integer.parseInt(input.substring(splitIndex + 1));
        }

        // Get the material belonging to the block and data
        Block block = Block.b(blockName);
        if (block != null)
        {
            return BukkitMaterialData.ofMinecraftBlock(block, blockData);
        }
        DefaultMaterial defaultMaterial = DefaultMaterial.getMaterial(blockName);
View Full Code Here

  private synchronized void nextBlockOutputStream() throws IOException {
    long blockId = r.nextLong();
    while (store.blockExists(blockId)) {
      blockId = r.nextLong();
    }
    nextBlock = new Block(blockId, bytesWrittenToBlock);
    blocks.add(nextBlock);
    bytesWrittenToBlock = 0;
  }
View Full Code Here

        int numBlocks = dataIn.readInt();
        Block[] blocks = new Block[numBlocks];
        for (int i = 0; i < numBlocks; i++) {
          long id = dataIn.readLong();
          long length = dataIn.readLong();
          blocks[i] = new Block(id, length);
        }
        in.close();
        return new INode(fileType, blocks);
      default:
        throw new IllegalArgumentException("Cannot deserialize inode.");
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_7_R3.Block

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.