Package net.minecraft.server.v1_6_R1

Examples of net.minecraft.server.v1_6_R1.Block


    }

    @Override
    protected void handlePacketAdd(Object o, Player owner) {
        if (o instanceof Packet20NamedEntitySpawn) {
            final Packet20NamedEntitySpawn packet = ((Packet20NamedEntitySpawn) o);
            final TagInfo info = this.handler.getNameForPacket20((String) null, packet.a, packet.b, owner);
            if (info != null) {
                packet.b = info.getName();
            }
        }
View Full Code Here


   */
  public static void sendHealthFoodUpdatePacket(Player player)
  {
    CraftPlayer cplayer = (CraftPlayer)player;
    EntityPlayer eplayer = cplayer.getHandle();
    eplayer.playerConnection.sendPacket(new Packet8UpdateHealth(eplayer.getHealth(), eplayer.getFoodData().a(), eplayer.getFoodData().e()));
  }
View Full Code Here

 
 
  public static Entry<Integer, String> getBiomeIdAndNameAt(World world, int x, int z)
  {
    CraftWorld craftWorld = (CraftWorld)world;
    WorldServer worldServer = craftWorld.getHandle();
   
    BiomeBase biomeBase = worldServer.getBiome(x, z);
   
    Integer id = biomeBase.id;
    String name = biomeBase.y;
   
    return new SimpleEntry<Integer, String>(id, name);
View Full Code Here

  }
 
  public static void setBiomeIdAt(World world, int x, int z, int id)
  {
    CraftWorld craftWorld = (CraftWorld)world;
    WorldServer worldServer = craftWorld.getHandle();
   
    BiomeBase bb = BiomeBase.biomes[id];
    if (craftWorld.loadChunk(x >> 4, z >> 4, false)) {
      Chunk chunk = worldServer.getChunkAtWorldCoords(x, z);

      if (chunk != null) {
        byte[] biomevals = chunk.m();
        biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte)bb.id;
      }
View Full Code Here

  }
 
  public static void recalcLightLevelAt(World world, int x, int y, int z)
  {
    CraftWorld cworld = (CraftWorld)world;
    WorldServer worldServer = cworld.getHandle();
    worldServer.A(x, y, z);
  }
View Full Code Here

    } else return entityHeight;
  }

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

    else return AlmostBoolean.match(block.material.isSolid());
  }

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

    } else return entityHeight;
  }

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

    else return AlmostBoolean.match(block.material.isSolid());
  }

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

      }
      return null;
    }

    try {
      Block proxy;
      switch(use) {
        case None:
          proxy = (Block) enc.create(); break;
        case Id:
          proxy = (Block) enc.create(use.constructor, new Object[] {parent.id}); break;
        case IdAndStep:
          {
            boolean field2;
            if (parent instanceof BlockStepAbstract) {
              field2 = ((Boolean)getField(BlockStepAbstract.class, parent, "a")).booleanValue();
            } else if (parent instanceof BlockFurnace) {
              field2 = ((Boolean)getField(parent, "b")).booleanValue();
            } else if (parent instanceof BlockRedstoneTorch) {
              field2 = ((Boolean)getField(parent, "isOn")).booleanValue();
            } else if (parent instanceof BlockDiodeAbstract) {
              field2 = ((Boolean)getField(BlockDiodeAbstract.class, parent, "a")).booleanValue();
            } else {
              field2 = ((Boolean)getField(parent, "a")).booleanValue();
            }
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field2});
          }
          break;
        case IdAndMaterial:
          proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material}); break;
        case IdAndTexture:
          proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, (Integer)getField(parent, "a")}); break;
        case IdTextureAndMaterial:
          proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material}); break;
        case IdMaterialAndFlag:
          proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material, false}); break;
        case IdAndName:
          {
            String name = (String) getField(parent, "a");
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, name});
          }
          break;
        case IdNameAndMaterial:
          {
            String name = (String) getField(parent, "a");
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, name, parent.material});
          }
          break;
        case IdNameMaterialAndDrop:
          {
            String name = (String) getField(BlockPressurePlateAbstract.class, parent, "a");
            int field4 = (Integer) getField(parent, "a");
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, name, parent.material, field4});
          }
          break;
        case IdBlockAndOther:
          {
            Block field2 = ((Block)getField(parent, "b"));
            int field3 = ((Integer)getField(parent, "c"));
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field2, field3});
          }
          break;
        case IdMaterialAndDrop:
          {
            int field3 = ((Integer)getField(parent, "b"));
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material, field3});
          }
          break;
        case SignBlock:
          {
            Class field2 = ((Class)getField(parent, "a"));
            boolean field3 = ((Boolean)getField(parent, "b"));
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field2, field3});
          }
          break;
        case IdTextureAndTicks:
          {
            boolean field3;
            if (parent instanceof BlockMinecartTrack || parent instanceof BlockRedstoneOre || parent instanceof BlockButtonAbstract || parent instanceof BlockPumpkin) {
              field3 = ((Boolean)getField(parent, "a")).booleanValue();
            } else {
              field3 = ((Boolean)getField(parent, "isTicking")).booleanValue();
            }
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field3});
          }
          break;
        case PressurePlate:
          {
            EnumMobType field3 = ((EnumMobType)getField(parent, "a"));
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field3, parent.material});
          }
          break;
        case HugeMushroom:
          {
            int field4 = ((Integer)getField(parent, "a"));
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material, field4});
          }
          break;
        case BlockStem:
          {
            Block field2;
            if (parent instanceof BlockStem) {
              field2 = ((Block)getField(parent, "blockFruit"));
            } else {
              field2 = Block.COBBLESTONE;
            }
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_6_R1.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.