Examples of addXpDrop()


Examples of org.spout.vanilla.component.entity.misc.DeathDrops.addXpDrop()

    setEntityProtocol(new CreatureProtocol(CreatureType.CAVE_SPIDER));
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    Random random = getRandom();
    dropComponent.addDrop(new ItemStack(VanillaMaterials.STRING, random.nextInt(2)));
    dropComponent.addDrop(new ItemStack(VanillaMaterials.SPIDER_EYE, random.nextInt(1)));
    dropComponent.addXpDrop((short) 3);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(12);
    }
    Damage damage = getOwner().add(Damage.class);
    damage.getDamageLevel(Difficulty.EASY).setAmount(2);
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.