gpt4 book ai didi

org.bukkit.entity.Zombie.isBaby()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 23:47:31 26 4
gpt4 key购买 nike

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

Zombie.isBaby介绍

[英]Gets whether the zombie is a baby
[中]获取僵尸是否为婴儿

代码示例

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

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

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

@Override
public boolean isBaby() {
  return getHandle().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: 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()) {

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

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

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

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

代码示例来源: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: elBukkit/MagicPlugin

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

代码示例来源: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();

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

context.registerModified(li);
  ((Ageable)li).setBaby();
} else  if (li instanceof Zombie && !((Zombie)li).isBaby()) {
  context.registerModified(li);
  ((Zombie)li).setBaby(true);

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

registerModified(li);
  ((Ageable)li).setBaby();
} else  if (li instanceof Zombie && !((Zombie)li).isBaby()) {
  registerModified(li);
  ((Zombie)li).setBaby(true);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com