本文整理汇总了Java中net.minecraft.entity.projectile.EntityPotion.setDead方法的典型用法代码示例。如果您正苦于以下问题:Java EntityPotion.setDead方法的具体用法?Java EntityPotion.setDead怎么用?Java EntityPotion.setDead使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.projectile.EntityPotion
的用法示例。
在下文中一共展示了EntityPotion.setDead方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: killPotions
import net.minecraft.entity.projectile.EntityPotion; //导入方法依赖的package包/类
/**
* Destroys Witch Potions that are currently in the protected area
* Only destroys the EntityPotion if it was thrown by an EntityWitch or derivatives
* @param chunkBounds AxisAlignedBB in which block should act
*/
private void killPotions(AxisAlignedBB chunkBounds) {
List<EntityPotion> list = world.getEntitiesWithinAABB(EntityPotion.class, chunkBounds);
for (EntityPotion potion : list) {
if (potion.getThrower() instanceof EntityWitch) {
potion.setDead();
}
}
}
示例2: killPotions
import net.minecraft.entity.projectile.EntityPotion; //导入方法依赖的package包/类
/**
* Destroys Witch Potions that are currently in the protected area
* Only destroys the EntityPotion if it was thrown by an EntityWitch or derivatives
* @param areaBounds AxisAlignedBB in which block should act
*/
private void killPotions(AxisAlignedBB areaBounds) {
List<EntityPotion> list = world.getEntitiesWithinAABB(EntityPotion.class, areaBounds);
for (EntityPotion potion : list) {
if (potion.getThrower() instanceof EntityWitch) {
potion.setDead();
}
}
}