本文整理汇总了Java中net.minecraft.entity.EntityLivingBase.func_70089_S方法的典型用法代码示例。如果您正苦于以下问题:Java EntityLivingBase.func_70089_S方法的具体用法?Java EntityLivingBase.func_70089_S怎么用?Java EntityLivingBase.func_70089_S使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.entity.EntityLivingBase
的用法示例。
在下文中一共展示了EntityLivingBase.func_70089_S方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isValid
import net.minecraft.entity.EntityLivingBase; //导入方法依赖的package包/类
private boolean isValid(Entity entity) {
if (!AngleUtil.isWithinFOV(entity, maxAngle.getValue())) {
return false;
}
if (entity instanceof EntityLivingBase) {
EntityLivingBase entityLiving = (EntityLivingBase) entity;
if (!Wrapper.thePlayer().func_70089_S() || !entityLiving.func_70089_S()
|| Wrapper.getDistanceToEntity(entityLiving) > this.range.getValue()) {
return false;
}
if (Wrapper.getDistanceToEntity(entity) < 1.0) {
return false;
}
}
return EntityUtil.isValid(entity, !raytrace.getValue());
}
示例2: isValid_render
import net.minecraft.entity.EntityLivingBase; //导入方法依赖的package包/类
public static boolean isValid_render(Entity entity, boolean raytrace, boolean reverseRaytrace) {
if (entity == null) return false;
if (entity == Wrapper.thePlayer()) return false;
if (entity.field_70128_L) return false;
if (!Bit.getInstance().getGlobalValueManager().find_bool("players").getValue()
&& entity instanceof EntityPlayer) return false;
if ((reverseRaytrace ? Wrapper.thePlayer().func_70685_l(entity) : !Wrapper.thePlayer().func_70685_l(entity)) && raytrace)
return false;
if (entity instanceof EntityLivingBase) {
EntityLivingBase entityLiving = (EntityLivingBase) entity;
if (!Wrapper.thePlayer().func_70089_S() || !entityLiving.func_70089_S()) return false;
if (!Bit.getInstance().getGlobalValueManager().find_bool("monsters").getValue()
&& EntityUtil.isMonster(entity)) return false;
if (!Bit.getInstance().getGlobalValueManager().find_bool("animals").getValue()
&& EntityUtil.isAnimal(entity)) return false;
} else {
return false;
}
return true;
}
示例3: isValid
import net.minecraft.entity.EntityLivingBase; //导入方法依赖的package包/类
public static boolean isValid(Entity entity, boolean raytrace) {
if (entity == null) return false;
if (entity == Wrapper.thePlayer()) return false;
if (entity.field_70128_L) return false;
if (!Wrapper.loadedEntityList().contains(entity)) return false;
if (!Bit.getInstance().getGlobalValueManager().find_bool("players").getValue()
&& entity instanceof EntityPlayer) return false;
if (!Wrapper.thePlayer().func_70685_l(entity) && raytrace) return false;
if (entity instanceof EntityLivingBase) {
EntityLivingBase entityLiving = (EntityLivingBase) entity;
if (!Wrapper.thePlayer().func_70089_S() || !entityLiving.func_70089_S()) return false;
if (Wrapper.isInvisible(entity)
&& !Bit.getInstance().getGlobalValueManager().find_bool("invisibles").getValue()) return false;
if (entityLiving instanceof EntityPlayer) {
ItemStack[] armor = ((EntityPlayer) entityLiving).field_71071_by.field_70460_b;
boolean naked = armor[0] == null && armor[1] == null && armor[2] == null && armor[3] == null;
if (naked && Bit.getInstance().getGlobalValueManager().find_bool("ignore naked").getValue())
return false;
if (Bit.getInstance().getGlobalValueManager().find_bool("teams").getValue()
&& Wrapper.player_isOnSameTeam(entityLiving)) return false;
return !Bit.getInstance().getFriendManager().isFriend(Wrapper.getName(entityLiving));
}
if (!Bit.getInstance().getGlobalValueManager().find_bool("monsters").getValue()
&& EntityUtil.isMonster(entity)) return false;
if (!Bit.getInstance().getGlobalValueManager().find_bool("animals").getValue()
&& EntityUtil.isAnimal(entity)) return false;
} else {
return false;
}
return true;
}