Package net.lightstone.msg

Examples of net.lightstone.msg.EntityMetadataMessage


  @Override
  public EntityMetadataMessage decode(ChannelBuffer buffer) throws IOException {
    int id = buffer.readInt();
    Parameter<?>[] parameters = ChannelBufferUtils.readParameters(buffer);
    return new EntityMetadataMessage(id, parameters);
  }
View Full Code Here


  public void setCrouching(boolean crouching) {
    // TODO: update other clients, needs to be figured out
    this.crouching = crouching;
    setMetadata(new Parameter<Byte>(Parameter.TYPE_BYTE, 0, new Byte((byte) (crouching ? 0x02: 0))));
    // FIXME: other bits in the bitmask would be wiped out
    EntityMetadataMessage message = new EntityMetadataMessage(id, metadata.clone());
    for (Player player : world.getPlayers()) { // TODO: this only needs to be sent to local players I think
      if (player != this) {
        player.getSession().send(message);
      }
    }
View Full Code Here

TOP

Related Classes of net.lightstone.msg.EntityMetadataMessage

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.