Package net.minecraft.server.v1_6_R3

Examples of net.minecraft.server.v1_6_R3.INetworkManager


  }

  @Override
  public ItemStack splitWithoutUpdate(int i) {
    if (this.items[i] != null) {
      ItemStack itemstack = this.items[i];

      this.items[i] = null;
      return itemstack;
    } else {
      return null;
View Full Code Here


  }

  @Override
  public ItemStack splitStack(int i, int j) {
    if (this.items[i] != null) {
      ItemStack itemstack;

      if (this.items[i].count <= j) {
        itemstack = this.items[i];
        this.items[i] = null;
        return itemstack;
View Full Code Here

    }
    Thread t = Thread.currentThread();
    if (!clazz.isInstance(t)) {
      return false;
    }
    NetworkManager nm = null;
    try {
      nm = (NetworkManager) a.get(t);
    } catch (Exception e) {
    }
    if (nm == null) {
View Full Code Here

    public CraftNPC(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager iteminworldmanager) {
        super(minecraftserver, world, s, iteminworldmanager);
        iteminworldmanager.setGameMode(EnumGamemode.SURVIVAL);

        NPCSocket socket = new NPCSocket();
        NetworkManager netMgr;
        try {
            netMgr = new NPCNetworkManager(server.getLogger(), socket, "npc mgr", new Connection() {
                @Override
                public boolean a() {
                    return false;
                }
            }, server.H().getPrivate());
            this.playerConnection = new NPCNetHandler(minecraftserver, this, netMgr);
            netMgr.a(this.playerConnection);
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            socket.close();
View Full Code Here

      Class<? extends Packet> packetClass = (Class<? extends Packet>) packets[packetId];
      if (packetClass == null) {
        return null;
      }
      Constructor<? extends Packet> c = packetClass.getConstructor(new Class[]{});
      Packet r = c.newInstance(blank);

      return newInstance(packetId, r);
    } catch (SecurityException e) {
      throw new RuntimeException(e);
    } catch (NoSuchMethodException e) {
View Full Code Here

    syncFlushPacketQueue(packetWrappers);
  }

  public void syncFlushPacketQueue(MCCraftPacket[] packetWrappers) {
    while (!resyncQueue.isEmpty()) {
      Packet p = resyncQueue.pollFirst();
      if (p != null) {
        syncedSendPacket(p, packetWrappers);
      }
    }
  }
View Full Code Here

                getWatcher(), true), getPlayer());
    }

    private void sleep() {
        Location loc = getPlayer().getLocation();
        Packet17EntityLocationAction packet17 = new Packet17EntityLocationAction(npc, 0, loc.getBlockX(),
                loc.getBlockY(), loc.getBlockZ());

        // getPlayer().teleport(loc);
        PacketUtils.sendPacketNearby(getPlayer().getLocation(), 64, packet17, getPlayer());
    }
View Full Code Here

  public static Spout getInstance() {
    return instance;
  }

  public void authenticate(Player player) {
      Packet18ArmAnimation packet = new Packet18ArmAnimation();
      packet.a = -42;
      ((SpoutCraftPlayer) SpoutCraftPlayer.getPlayer(player)).getPlayerConnection().sendImmediatePacket(packet);
  }
View Full Code Here

    private void actHurt() {
        PacketUtils.sendPacketNearby(getPlayer().getLocation(), 64, getArmAnimationPacket(2), getPlayer());
    }

    private Packet18ArmAnimation getArmAnimationPacket(int data) {
        return new Packet18ArmAnimation(this.npc, data);
    }
View Full Code Here

    private void swingArm() {
        PacketUtils.sendPacketNearby(getPlayer().getLocation(), 64, getArmAnimationPacket(1), getPlayer());
    }

    private void unsleep() {
        PacketUtils.sendPacketNearby(getPlayer().getLocation(), 64, new Packet18ArmAnimation(this.npc, 3),
                getPlayer());
    }
View Full Code Here

TOP

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

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.