本文整理了Java中net.minecraft.entity.Entity.isCreatureType()
方法的一些代码示例,展示了Entity.isCreatureType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Entity.isCreatureType()
方法的具体详情如下:
包路径:net.minecraft.entity.Entity
类名称:Entity
方法名:isCreatureType
暂无
代码示例来源:origin: Alex-the-666/Ice_and_Fire
public static boolean isAnimaniaChicken(Entity entity){
String className = entity.getClass().getName();
return (className.contains("chicken") || entity instanceof EntityChicken) && entity instanceof EntityLiving && !entity.isCreatureType(EnumCreatureType.MONSTER, false);
}
代码示例来源:origin: TeamLapen/Vampirism
@SubscribeEvent
public void onEntityCheckSpawn(LivingSpawnEvent.CheckSpawn event) {
IBlockState blockState = event.getWorld().getBlockState(new BlockPos(event.getX() - 0.4F, event.getY(), event.getZ() - 0.4F).down());
if (blockState.getBlock().equals(ModBlocks.castle_block)) {
if (BlockCastleBlock.EnumType.DARK_STONE.equals(blockState.getValue(BlockCastleBlock.VARIANT)) || !event.getEntity().isCreatureType(VReference.VAMPIRE_CREATURE_TYPE, false)) {
event.setResult(Event.Result.DENY);
}
} else if (blockState.getBlock() instanceof BlockCastleStairs) {
if (ModBlocks.castle_stairs_dark_stone.equals(blockState.getBlock()) || !event.getEntity().isCreatureType(VReference.VAMPIRE_CREATURE_TYPE, false)) {
event.setResult(Event.Result.DENY);
}
}
}
代码示例来源:origin: PrinceOfAmber/Cyclic
if (mop.entityHit != null) {
if (mop.entityHit.isCreatureType(EnumCreatureType.MONSTER, false)
|| mop.entityHit instanceof EntityPlayer) {
mop.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), damage);
内容来源于网络,如有侵权,请联系作者删除!