Examples of EntityStatusMessage


Examples of net.glowstone.net.message.play.entity.EntityStatusMessage

public final class EntityStatusCodec implements Codec<EntityStatusMessage> {
    @Override
    public EntityStatusMessage decode(ByteBuf buf) throws IOException {
        int id = buf.readInt();
        int status = buf.readByte();
        return new EntityStatusMessage(id, status);
    }
View Full Code Here

Examples of net.lightstone.msg.EntityStatusMessage

  @Override
  public EntityStatusMessage decode(ChannelBuffer buffer) throws IOException {
    int id = buffer.readInt();
    int status = buffer.readUnsignedByte();
    return new EntityStatusMessage(id, status);
  }
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.entity.EntityStatusMessage

    event.getMessages().add(new EntityAnimationMessage(event.getEntity().getId(), (byte) event.getAnimation().getId()));
  }

  @EventHandler
  public void onEntityStatus(EntityStatusEvent event) {
    event.getMessages().add(new EntityStatusMessage(event.getEntity().getId(), event.getStatus()));
  }
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.entity.EntityStatusMessage

        final int hunger = getHunger();

        //Timer when eating. Sends a Enting done if the player eated the food the whole time.
        if (eatingTimer != 0f) {
          if (eatingTimer >= 1.5f) {
            ((Player) getOwner()).getNetwork().getSession().send(new EntityStatusMessage(getOwner().getId(), EntityStatusMessage.EATING_ACCEPTED));
            if (foodEating.get() != null) {
              if (foodEating.get().getMaterial() instanceof Food) {
                ((Food) foodEating.get().getMaterial()).onEat(getOwner(), foodEating);
              } else if (foodEating.get().getMaterial() instanceof PotionItem) {
                ((PotionItem) foodEating.get().getMaterial()).onDrink(getOwner(), foodEating);
View Full Code Here

Examples of org.spout.vanilla.protocol.msg.entity.EntityStatusMessage

  @Override
  public EntityStatusMessage decode(ByteBuf buffer) throws IOException {
    int id = buffer.readInt();
    byte status = buffer.readByte();
    return new EntityStatusMessage(id, status);
  }
View Full Code Here
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.