Package org.spout.vanilla.event.entity.network

Examples of org.spout.vanilla.event.entity.network.EntityMetaChangeEvent


  public void setForwardDirection(BlockFace direction) {
    this.direction = direction;
    List<Parameter<?>> params = new ArrayList<Parameter<?>>();
    params.add(new Parameter<Integer>(Parameter.TYPE_INT, 18, (int) VanillaByteBufUtils.getNativeDirection(direction)));
    getOwner().getNetwork().callProtocolEvent(new EntityMetaChangeEvent(getOwner(), params));
  }
View Full Code Here


  public void setMaterial(Material material) {
    this.material = material;
    List<Parameter<?>> params = new ArrayList<Parameter<?>>();
    params.add(new Parameter<ItemStack>(Parameter.TYPE_ITEM, 2, material == null ? null : new ItemStack(material, 1)));
    getOwner().getNetwork().callProtocolEvent(new EntityMetaChangeEvent(getOwner(), params));
  }
View Full Code Here

      if (owner instanceof Player) {
        owner.getNetwork().callProtocolEvent(new PlayerHealthEvent((Player) getOwner()));
      } else if (owner instanceof EnderDragon || owner instanceof Wither) {
        java.util.List<Parameter<?>> params = new ArrayList<Parameter<?>>(1);
        params.add(new Parameter<Short>(Parameter.TYPE_SHORT, 16, (short) health));
        owner.getNetwork().callProtocolEvent(new EntityMetaChangeEvent(owner, params));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.spout.vanilla.event.entity.network.EntityMetaChangeEvent

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.