Package org.spout.vanilla.protocol.entity.creature

Examples of org.spout.vanilla.protocol.entity.creature.CreatureProtocol


*/
public class EnderDragon extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.ENDER_DRAGON));
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(200);
    }
    getOwner().add(DeathDrops.class).addXpDrop((short) 20000);
    Damage damage = getOwner().add(Damage.class);
View Full Code Here


  @Override
  public void onAttached() {
    super.onAttached();
    Random random = getRandom();

    setEntityProtocol(new CreatureProtocol(CreatureType.SKELETON));
    getOwner().add(EntityInventory.class);
    getOwner().add(EntityItemCollector.class);

    //Physics
    PhysicsComponent physics = getOwner().getPhysics();
View Full Code Here

*/
public class Witch extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.WITCH));
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    Random random = getRandom();
    dropComponent.addDrop(new ItemStack(VanillaMaterials.GLASS_BOTTLE, random.nextInt(6)));
    dropComponent.addDrop(new ItemStack(VanillaMaterials.GLOWSTONE_DUST, random.nextInt(6)));
    dropComponent.addDrop(new ItemStack(VanillaMaterials.GUNPOWDER, random.nextInt(6)));
View Full Code Here

*/
public class Blaze extends Living implements Hostile, Aggressive {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.BLAZE));
    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.BLAZE_ROD, getRandom().nextInt(1))).addXpDrop((short) 10);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(20);
    }
    Damage damage = getOwner().add(Damage.class);
View Full Code Here

*/
public class Ghast extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.GHAST));
    DeathDrops dropComponent = getOwner().add(DeathDrops.class);
    Random random = getRandom();
    dropComponent.addDrop(new ItemStack(VanillaMaterials.GUNPOWDER, random.nextInt(2)));
    dropComponent.addDrop(new ItemStack(VanillaMaterials.GHAST_TEAR, random.nextInt(1)));
    dropComponent.addXpDrop((short) 5);
View Full Code Here

*/
public class Wither extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.WITHER));
    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.NETHER_STAR, 1)).addXpDrop((short) 50);
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(300);
    }

View Full Code Here

*/
public class Zombie extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.ZOMBIE));
    getOwner().add(DeathDrops.class).addDrop(new ItemStack(VanillaMaterials.ROTTEN_FLESH, getRandom().nextInt(2))).addXpDrop((short) 5);
    getOwner().add(EntityInventory.class);
    getOwner().add(EntityItemCollector.class);

    PhysicsComponent physics = getOwner().getPhysics();
View Full Code Here

*/
public class CaveSpider extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    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);
View Full Code Here

*/
public class Giant extends Living implements Hostile {
  @Override
  public void onAttached() {
    super.onAttached();
    setEntityProtocol(new CreatureProtocol(CreatureType.GIANT));
    if (getAttachedCount() == 1) {
      getOwner().add(Health.class).setSpawnHealth(100);
    }

    Damage damage = getOwner().add(Damage.class);
View Full Code Here

TOP

Related Classes of org.spout.vanilla.protocol.entity.creature.CreatureProtocol

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.