Package net.minecraft.server.v1_7_R4

Examples of net.minecraft.server.v1_7_R4.AxisAlignedBB


    }
  }

  @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

        int m = paramInt2 + paramInt3 >> 2;

        int n = k - i + 1;
        int i1 = m - j + 1;
        int[] arrayOfInt = this.biomeGenerator.getBiomesUnZoomed(null, i, j, n, i1, OutputType.DEFAULT_FOR_WORLD);
        ChunkPosition localChunkPosition = null;
        int i2 = 0;
        for (int i3 = 0; i3 < arrayOfInt.length; i3++)
        {
            if (arrayOfInt[i3] >= DefaultBiome.values().length)
                continue;
            int i4 = i + i3 % n << 2;
            int i5 = j + i3 / n << 2;
            BiomeBase localBiomeBase = BiomeBase.getBiome(arrayOfInt[i3]);
            if ((!paramList.contains(localBiomeBase)) || ((localChunkPosition != null) && (paramRandom.nextInt(i2 + 1) != 0)))
                continue;
            localChunkPosition = new ChunkPosition(i4, 0, i5);
            i2++;
        }

        return localChunkPosition;
    }
View Full Code Here

        }
        return ccommandPacket;
    }

    public static DataWatcher getWatcher(String text, int health) {
        DataWatcher watcher = new DataWatcher(null);
        watcher.a(0, (byte) 0x20); //Flags, 0x20 = invisible
        watcher.a(6, (float) health);
        watcher.a(10, text); //Entity name
        watcher.a(11, (byte) 1); //Show name, 1 = show, 0 = don't show
        return watcher;
    }
View Full Code Here

            int health = (loadUp ? 0 : 300);

            @Override
            public void run() {
                if ((loadUp ? health < 300 : health > 0)) {
                    DataWatcher watcher = getWatcher(text, health);
                    PacketPlayOutEntityMetadata metaPacket = getMetadataPacket(watcher);
                    PacketHelper.sendPacket(player, metaPacket);
                    if (loadUp) {
                        health += healthAdd;
                    } else {
                        health -= healthAdd;
                    }
                } else {
                    DataWatcher watcher = getWatcher(text, (loadUp ? 300 : 0));
                    PacketPlayOutEntityMetadata metaPacket = getMetadataPacket(watcher);
                    PacketPlayOutEntityDestroy destroyEntityPacket = getDestroyEntityPacket();
                    PacketHelper.sendPacket(player, metaPacket);
                    PacketHelper.sendPacket(player, destroyEntityPacket);
                    hasHealthBar.put(player.getName(), false);
//Complete text
                    PacketPlayOutSpawnEntityLiving mobPacket = getMobPacket(completeText, player.getLocation(), 200);
                    PacketHelper.sendPacket(player, mobPacket);
                    hasHealthBar.put(player.getName(), true);
                    DataWatcher watcher2 = getWatcher(completeText, 300);
                    PacketPlayOutEntityMetadata metaPacket2 = getMetadataPacket(watcher2);
                    PacketHelper.sendPacket(player, metaPacket2);
                    new BukkitRunnable() {
                        @Override
                        public void run() {
View Full Code Here

        super.remove();
    }

    public static Arrow createArrow(Location location) {
        CraftWorld world = (CraftWorld) location.getWorld();
        EntityArrow arrow = new FakeArrowEntity(world, location);
        return (Arrow) arrow.getBukkitEntity();
    }
View Full Code Here

     *
     */
    @EventHandler
    public void NPCCompleteDestination (NavigationCompleteEvent event) {
        if (event.getNPC() == npc && pushed) {
            EntityLiving handle = ((CraftLivingEntity) npc.getBukkitEntity()).getHandle();
            handle.yaw = returnLocation.getYaw();
            handle.pitch = returnLocation.getPitch();
            // !--- START NMS OBFUSCATED
            handle.az = handle.yaw; // The head's yaw
            // !--- END NMS OBFUSCATED
View Full Code Here

            return;
        }

        // If the target is not null, cast it to an NMS EntityLiving
        // as well for one of the two methods below
        EntityLiving nmsTarget = target != null ? ((CraftLivingEntity) target).getHandle()
                : null;

        ((CraftCreature) entity).getHandle().
                setGoalTarget(nmsTarget);
View Full Code Here

    private static void look(Entity entity, float yaw, float pitch) {
        net.minecraft.server.v1_7_R4.Entity handle = !(entity instanceof CraftEntity)?null:((CraftEntity)entity).getHandle();
        if (handle != null) {
            handle.yaw = yaw;
            if(entity instanceof EntityLiving) {
                EntityLiving livingHandle = (EntityLiving) entity;
                while (yaw < -180.0F) {
                    yaw += 360.0F;
                }
                while(yaw >= 180.0F) {
                    yaw -= 360.0F;
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_7_R4.AxisAlignedBB

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.