Examples of canBeCollected()


Examples of org.spout.vanilla.component.entity.substance.Item.canBeCollected()

public class PlayerItemCollector extends EntityItemCollector {
  @Override
  public void onTick(float dt) {
    for (Entity entity : getNearbyEntities()) {
      Item item = entity.get(Item.class);
      if (item != null && item.canBeCollected()) {
        getOwner().getNetwork().callProtocolEvent(new EntityCollectItemEvent(getOwner(), entity));
        PlayerInventory inv = getOwner().get(PlayerInventory.class);
        if (inv != null) {
          inv.add(item.getItemStack());
        }
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.