Package net.minecraft.server.v1_6_R3

Examples of net.minecraft.server.v1_6_R3.Vec3D


  }

  public static boolean updateBukkitEntity(Player player) {
    if (!(player instanceof SpoutCraftPlayer)) {
      CraftPlayer cp = (CraftPlayer) player;
      EntityPlayer ep = cp.getHandle();
      return updateBukkitEntity(ep);
    }
    return false;
  }
View Full Code Here


            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;
            }
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field2});
          }
          break;
        case IdTextureMaterialAndTransparent:
          {
            boolean field4 = ((Boolean)getField(BlockHalfTransparant.class, parent, "a")).booleanValue();
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, parent.material, field4});
          }
          break;
        case IdTextureDataMaterialAndDrops:
          {
            int field3 = (Integer) getField(parent, "a");
            boolean field5 = ((Boolean)getField(parent, "b")).booleanValue();
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, field3, parent.material, field5});
          }
          break;
        case IdNameMaterialAndMobType:
          {
            String name = (String) getField(BlockPressurePlateAbstract.class, parent, "a");
            EnumMobType mobs = (EnumMobType) getField(BlockPressurePlateBinary.class, parent, "a");
            proxy = (Block) enc.create(use.constructor, new Object[] {parent.id, name, parent.material, mobs});
          }
          break;
        case IdStringStringMaterialAndFlag:
          {
View Full Code Here

  public static void replaceSpades() {
    for (int i = 0; i < Item.byId.length; i++) {
      if (Item.byId[i] != null) {
        if (Item.byId[i] instanceof ItemSpade) {
          ItemSpade spade = (ItemSpade)Item.byId[i];
          EnumToolMaterial etm = null;
          Field tool = null;
          try {
            tool = ItemTool.class.getDeclaredField("b");
            tool.setAccessible(true);
            etm = (EnumToolMaterial) tool.get(spade);
View Full Code Here

  public static void replacePickaxes() {
    for (int i = 0; i < Item.byId.length; i++) {
      if (Item.byId[i] != null) {
        if (Item.byId[i] instanceof ItemPickaxe) {
          ItemPickaxe pickaxe = (ItemPickaxe)Item.byId[i];
          EnumToolMaterial etm = null;
          try {
            Field tool = ItemTool.class.getDeclaredField("b");
            tool.setAccessible(true);
            etm = (EnumToolMaterial) tool.get(pickaxe);
          } catch (Exception e) {
View Full Code Here

    return openInventoryWindow(inventory, location, false);
  }

  @Override
  public boolean openInventoryWindow(Inventory inventory, Location location, boolean ignoreDistance) {
    IInventory dialog = ((CraftInventory) inventory).getInventory();
    if (dialog instanceof TileEntityDispenser) {
      getHandle().openDispenser((TileEntityDispenser) dialog);
    } else if (dialog instanceof TileEntityFurnace) {
      getHandle().openFurnace((TileEntityFurnace) dialog);
    } else {
View Full Code Here

  private SpoutPlayer lookupPlayer(NetworkManager nm) {
    for (Player p : Bukkit.getOnlinePlayers()) {
      if (!(p instanceof CraftPlayer)) {
        continue;
      }
      INetworkManager n = ((CraftPlayer) p).getHandle().playerConnection.networkManager;
      if (n == nm) {
        return SpoutManager.getPlayer(p);
      }
    }
    return null;
View Full Code Here

      cp.getHandle().playerConnection.a();
      Location loc = player.getLocation();
      PlayerConnection handler = new PlayerConnection(MinecraftServer.getServer(), cp.getHandle().playerConnection.networkManager, cp.getHandle());
      handler.a(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
      cp.getHandle().playerConnection = handler;
      INetworkManager nm = cp.getHandle().playerConnection.networkManager;
      setPlayerConnection(nm, cp.getHandle().playerConnection);
      oldHandler.disconnected = true;
      return true;
    }
    return false;
View Full Code Here

      ChunkCoordIntPair c = (ChunkCoordIntPair) o;
      handler.addActiveChunk(c);
      }*/
      handler.a(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
      cp.getHandle().playerConnection = handler;
      INetworkManager nm = cp.getHandle().playerConnection.networkManager;
      setPlayerConnection(nm, cp.getHandle().playerConnection);
      Field handlerList = null;
      try {
        handlerList = ServerConnection.class.getDeclaredField("c");
        handlerList.setAccessible(true);
View Full Code Here

   */
  public static void replacePickaxes() {
    for (int i = 0; i < Item.byId.length; i++) {
      if (Item.byId[i] != null) {
        if (Item.byId[i] instanceof ItemPickaxe) {
          ItemPickaxe pickaxe = (ItemPickaxe)Item.byId[i];
          EnumToolMaterial etm = null;
          try {
            Field tool = ItemTool.class.getDeclaredField("b");
            tool.setAccessible(true);
            etm = (EnumToolMaterial) tool.get(pickaxe);
View Full Code Here

   */
  public static void replaceSpades() {
    for (int i = 0; i < Item.byId.length; i++) {
      if (Item.byId[i] != null) {
        if (Item.byId[i] instanceof ItemSpade) {
          ItemSpade spade = (ItemSpade)Item.byId[i];
          EnumToolMaterial etm = null;
          Field tool = null;
          try {
            tool = ItemTool.class.getDeclaredField("b");
            tool.setAccessible(true);
            etm = (EnumToolMaterial) tool.get(spade);
            Item.byId[i] = null;
            Item.byId[i] = new CustomItemSpade(spade.id-256, etm);
          } catch (Exception e) {
            System.out.println("Unexpected error replacing the spade material");
            System.out.println("Current item: " + i + " Total Items: " + Item.byId.length);
            System.out.println("Crashed replacing: " + spade.getClass() + " " + spade.toString());
            System.out.println("Was using reflection with: " + (tool != null ? tool.getName() : "null") + " " + tool);
            e.printStackTrace();
          }
        }
      }
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_6_R3.Vec3D

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.