org.bukkit.entity.Zombie类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(5.6k)|赞(0)|评价(0)|浏览(89)

本文整理了Java中org.bukkit.entity.Zombie类的一些代码示例,展示了Zombie类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zombie类的具体详情如下:
包路径:org.bukkit.entity.Zombie
类名称:Zombie

Zombie介绍

[英]Represents a Zombie.
[中]代表一个僵尸。

代码示例

代码示例来源:origin: elBukkit/MagicPlugin

@Override
public void apply(Entity entity) {
  if (!(entity instanceof Zombie)) return;
  Zombie zombie = (Zombie)entity;
  zombie.setBaby(isBaby);
}

代码示例来源:origin: elBukkit/MagicPlugin

public EntityZombieData(Zombie zombie) {
  isBaby = zombie.isBaby();
}

代码示例来源:origin: xXKeyleXx/MyPet

public void convertZombie(Zombie zombie, TagCompound properties) {
  properties.getCompoundData().put("Baby", new TagByte(zombie.isBaby()));
  if (zombie.isVillager()) {
    properties.getCompoundData().put("Type", new TagInt(1));
  }
}

代码示例来源:origin: elBukkit/MagicPlugin

} else  if (li instanceof Zombie) {
  Zombie zombie = (Zombie)li;
  if (!zombie.isBaby()) {
    replaceType = EntityType.GIANT;
  } else {
    context.registerModified(li);
    ((Zombie) li).setBaby(false);

代码示例来源:origin: EngineHub/CommandBook

((Ageable) creature).setBaby();
} else if (creature instanceof Zombie) {
  ((Zombie) creature).setBaby(true);
    case ZOMBIE:
      if (specialType.matches("(?i)villager")) {
        ((Zombie) creature).setVillager(true);

代码示例来源:origin: eccentricdevotion/TARDIS

case ZOMBIE:
  Zombie zombie = (Zombie) ent;
  zombie.setBaby(m.isBaby());
  EntityEquipment ez = zombie.getEquipment();
  if (m.getEquipment() != null) {
    ez.setArmorContents(m.getEquipment().getArmorContents());

代码示例来源:origin: eccentricdevotion/TARDIS

case ZOMBIE_VILLAGER:
  Zombie zombie = (Zombie) e;
  tm.setBaby(zombie.isBaby());
  tm.setEquipment(zombie.getEquipment());
  if (twa && zombie.getEquipment().getHelmet() != null && zombie.getEquipment().getHelmet().hasItemMeta() && zombie.getEquipment().getHelmet().getItemMeta().hasDisplayName()) {
    String name = zombie.getEquipment().getHelmet().getItemMeta().getDisplayName();
    if (name.equals("Cyberman Head") || name.equals("Empty Child Head") || name.equals("Sontaran Head") || name.equals("Vashta Nerada Head") || name.equals("Zygon Head")) {
      dn = name.substring(0, name.length() - 5);

代码示例来源:origin: xXKeyleXx/MyPet

((Slime) normalEntity).setSize(((MySlime) myPet).getSize());
} else if (myPet instanceof MyZombie) {
  ((Zombie) normalEntity).setVillager(((MyZombie) myPet).isVillager());
} else if (myPet instanceof MySkeleton) {
  ((Skeleton) normalEntity).setSkeletonType(Skeleton.SkeletonType.values()[((MySkeleton) myPet).getType()]);

代码示例来源:origin: elBukkit/MagicPlugin

registerModified(li);
Zombie zombie = (Zombie)li;
if (!zombie.isBaby()) {
  UndoList spawnedList = com.elmakers.mine.bukkit.block.UndoList.getUndoList(li);
  Location targetLocation = li.getLocation();
  ((Zombie) li).setBaby(false);

代码示例来源:origin: elBukkit/MagicPlugin

context.registerModified(li);
  ((Ageable)li).setBaby();
} else  if (li instanceof Zombie && !((Zombie)li).isBaby()) {
  context.registerModified(li);
  ((Zombie)li).setBaby(true);
} else  if (li instanceof Slime && ((Slime)li).getSize() > 1) {
  context.registerModified(li);
  Entity replacement = targetLocation.getWorld().spawnEntity(targetLocation, replaceType);
  if (replacement instanceof Zombie) {
    ((Zombie)replacement).setBaby(false);

代码示例来源:origin: EngineHub/CommandHelper

@Override
  public void setBaby(boolean isBaby) {
    getHandle().setBaby(isBaby);
  }
}

代码示例来源:origin: EngineHub/CommandHelper

@Override
public boolean isBaby() {
  return getHandle().isBaby();
}

代码示例来源:origin: elBukkit/MagicPlugin

Entity zombie = targetLocation.getWorld().spawnEntity(targetLocation, EntityType.ZOMBIE);
  if (zombie instanceof Zombie) {
    ((Zombie)zombie).setBaby(false);
  registerModified(li);
  ((Ageable)li).setBaby();
} else  if (li instanceof Zombie && !((Zombie)li).isBaby()) {
  registerModified(li);
  ((Zombie)li).setBaby(true);
} else  if (li instanceof PigZombie && !((PigZombie)li).isBaby()) {
  registerModified(li);

代码示例来源:origin: libraryaddict/LibsDisguises

((Zombie) bukkitEntity).setBaby(true);

代码示例来源:origin: libraryaddict/LibsDisguises

baby = ((Zombie) disguisedEntity).isBaby();
} else if (disguisedEntity instanceof Ageable) {
  baby = !((Ageable) disguisedEntity).isAdult();

代码示例来源:origin: elBukkit/MagicPlugin

zombie.setBaby(false);
zombie.setBaby(true);
showEntityInfo(sender, testEntity, label, formatter);

代码示例来源:origin: eccentricdevotion/TARDIS

case ZOMBIE:
  Zombie z = (Zombie) e;
  if (z.isBaby()) {
    plugin.getServer().dispatchCommand(plugin.getConsole(), "npc zombiemod -b");

代码示例来源:origin: garbagemule/MobArena

case "babyzombie":
case "babypigman":
  ((Zombie) e).setBaby(true);
  break;
case "killerbunny":

代码示例来源:origin: libraryaddict/LibsDisguises

public static void doBoundingBox(TargetedDisguise disguise) {
  Entity entity = disguise.getEntity();
  if (entity == null) {
    return;
  }
  if (isDisguiseInUse(disguise)) {
    DisguiseValues disguiseValues = DisguiseValues.getDisguiseValues(disguise.getType());
    FakeBoundingBox disguiseBox = disguiseValues.getAdultBox();
    if (disguiseValues.getBabyBox() != null) {
      if ((disguise.getWatcher() instanceof AgeableWatcher &&
          ((AgeableWatcher) disguise.getWatcher()).isBaby()) ||
          (disguise.getWatcher() instanceof ZombieWatcher &&
              ((ZombieWatcher) disguise.getWatcher()).isBaby())) {
        disguiseBox = disguiseValues.getBabyBox();
      }
    }
    ReflectionManager.setBoundingBox(entity, disguiseBox);
  } else {
    DisguiseValues entityValues = DisguiseValues.getDisguiseValues(DisguiseType.getType(entity.getType()));
    FakeBoundingBox entityBox = entityValues.getAdultBox();
    if (entityValues.getBabyBox() != null) {
      if ((entity instanceof Ageable && !((Ageable) entity).isAdult()) ||
          (entity instanceof Zombie && ((Zombie) entity).isBaby())) {
        entityBox = entityValues.getBabyBox();
      }
    }
    ReflectionManager.setBoundingBox(entity, entityBox);
  }
}

代码示例来源:origin: nsporillo/GlobalWarming

case PIG_ZOMBIE:
case ZOMBIE_VILLAGER:
  ((Zombie)entity).setBaby(true);
break;

相关文章