Examples of XPOrb


Examples of org.spout.vanilla.component.entity.substance.XPOrb

        }
      }
      if (dropComponent.getXpDrop() > 0 && VanillaConfiguration.PLAYER_SURVIVAL_ENABLE_XP.getBoolean()) {
        org.spout.api.geo.discrete.Point pos = getOwner().getPhysics().getPosition();

        XPOrb xporb = pos.getWorld().createEntity(pos, XPOrb.class).add(XPOrb.class);
        xporb.setExperience(dropComponent.getXpDrop());
        pos.getWorld().spawnEntity(xporb.getOwner());
      }
    }
  }
View Full Code Here

Examples of org.spout.vanilla.component.entity.substance.XPOrb

import org.spout.vanilla.protocol.msg.entity.spawn.EntityExperienceOrbMessage;

public class XPOrbEntityProtocol extends VanillaEntityProtocol {
  @Override
  public List<Message> getSpawnMessages(Entity entity, RepositionManager rm) {
    XPOrb xp = entity.add(XPOrb.class);
    int id = entity.getId();
    int x = (int) (entity.getPhysics().getPosition().getX() * 32);
    int y = (int) (entity.getPhysics().getPosition().getY() * 32);
    int z = (int) (entity.getPhysics().getPosition().getZ() * 32);
    return Arrays.<Message>asList(new EntityExperienceOrbMessage(id, x, y, z, xp.getExperience(), rm));
  }
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.