Package packets.c2spackets

Source Code of packets.c2spackets.P0x13

package packets.c2spackets;

import datatypes.MCAction;
import network.MCConnection;
import exceptions.UnrecoverableException;
import packets.PacketHandler;
import world.WorldState;

/**
* Entity Action.
* Is sent by the client when the player performs a certain action.
* The results of these actions seem to be only needed for visiual effects.
*/
public class P0x13 extends PacketHandler {

  public P0x13(WorldState worldstate) {
    super(worldstate);
  }

  @Override
  public void handle(MCConnection conn) throws UnrecoverableException {
    /*int eid = */conn.r.readInt();
    MCAction action = MCAction.getAction(conn.r.read());
    conn.getPlayer().setAction(action);
  }

}
TOP

Related Classes of packets.c2spackets.P0x13

TOP
Copyright © 2018 www.massapi.com. 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.