本文整理匯總了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;
}