本文整理匯總了Java中net.minecraft.command.IEntitySelector.isEntityApplicable方法的典型用法代碼示例。如果您正苦於以下問題:Java IEntitySelector.isEntityApplicable方法的具體用法?Java IEntitySelector.isEntityApplicable怎麽用?Java IEntitySelector.isEntityApplicable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.command.IEntitySelector
的用法示例。
在下文中一共展示了IEntitySelector.isEntityApplicable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EntityAINearestAttackableDragon
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityAINearestAttackableDragon(EntityCreature attacker, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_) {
super(attacker, p_i1665_4_, p_i1665_5_);
this.targetClass = EntityPlayer.class;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityAINearestAttackableTarget.Sorter(attacker);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector() {
// private static final String __OBFID = "CL_00001621";
/**
* Return whether the specified entity is applicable to this filter.
*/
public boolean isEntityApplicable(Entity p_82704_1_) {
return !(p_82704_1_ instanceof EntityLivingBase) ? false :
(p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false :
EntityAINearestAttackableDragon.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
示例2: getEntitiesOfTypeWithinAAAB
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
/**
* Gets all entities that can be assigned to the specified class. Args: entityClass, aabb, listToFill
*/
public void getEntitiesOfTypeWithinAAAB(Class par1Class, AxisAlignedBB par2AxisAlignedBB, List par3List, IEntitySelector par4IEntitySelector)
{
int var5 = MathHelper.floor_double((par2AxisAlignedBB.minY - 2.0D) / 16.0D);
int var6 = MathHelper.floor_double((par2AxisAlignedBB.maxY + 2.0D) / 16.0D);
var5 = MathHelper.clamp_int(var5, 0, this.entityLists.length - 1);
var6 = MathHelper.clamp_int(var6, 0, this.entityLists.length - 1);
for (int var7 = var5; var7 <= var6; ++var7)
{
List var8 = this.entityLists[var7];
for (int var9 = 0; var9 < var8.size(); ++var9)
{
Entity var10 = (Entity)var8.get(var9);
if (par1Class.isAssignableFrom(var10.getClass()) && var10.boundingBox.intersectsWith(par2AxisAlignedBB) && (par4IEntitySelector == null || par4IEntitySelector.isEntityApplicable(var10)))
{
par3List.add(var10);
}
}
}
}
示例3: EntityAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityAINearestAttackableTarget(EntityCreature par1EntityCreature, Class par2Class, int par3, boolean par4, boolean par5, final IEntitySelector par6IEntitySelector)
{
super(par1EntityCreature, par4, par5);
this.targetClass = par2Class;
this.targetChance = par3;
this.theNearestAttackableTargetSorter = new EntityAINearestAttackableTarget.Sorter(par1EntityCreature);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
private static final String __OBFID = "CL_00001621";
public boolean isEntityApplicable(Entity par1Entity)
{
return !(par1Entity instanceof EntityLivingBase) ? false : (par6IEntitySelector != null && !par6IEntitySelector.isEntityApplicable(par1Entity) ? false : EntityAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)par1Entity, false));
}
};
}
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:17,代碼來源:EntityAINearestAttackableTarget.java
示例4: EntityAICustomNearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityAICustomNearestAttackableTarget(EntityCreature p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityAICustomNearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
private static final String __OBFID = "CL_00001621";
/**
* Return whether the specified entity is applicable to this filter.
*/
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityAICustomNearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
示例5: getEntitiesOfTypeWithinAAAB
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public void getEntitiesOfTypeWithinAAAB(Class p_76618_1_, AxisAlignedBB p_76618_2_, List p_76618_3_, IEntitySelector p_76618_4_)
{
int i = MathHelper.floor_double((p_76618_2_.minY - World.MAX_ENTITY_RADIUS) / 16.0D);
int j = MathHelper.floor_double((p_76618_2_.maxY + World.MAX_ENTITY_RADIUS) / 16.0D);
i = MathHelper.clamp_int(i, 0, this.entityLists.length - 1);
j = MathHelper.clamp_int(j, 0, this.entityLists.length - 1);
for (int k = i; k <= j; ++k)
{
List list1 = this.entityLists[k];
for (int l = 0; l < list1.size(); ++l)
{
Entity entity = (Entity)list1.get(l);
if (p_76618_1_.isAssignableFrom(entity.getClass()) && entity.boundingBox.intersectsWith(p_76618_2_) && (p_76618_4_ == null || p_76618_4_.isEntityApplicable(entity)))
{
p_76618_3_.add(entity);
}
}
}
}
示例6: EntityAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityAINearestAttackableTarget(EntityCreature p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
private static final String __OBFID = "CL_00001621";
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
示例7: EntityAITamedNearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityAITamedNearestAttackableTarget(EntityTameable p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_) {
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.tameable = p_i1665_1_;
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityAITamedNearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector() {
private static final String __OBFID = "CL_00001621";
/**
* Return whether the specified entity is applicable to this filter.
*/
public boolean isEntityApplicable(Entity p_82704_1_) {
return p_82704_1_ instanceof EntityLivingBase && (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityAITamedNearestAttackableTarget.this.isSuitableTarget((EntityLivingBase) p_82704_1_, false));
}
};
}
示例8: getEntitiesInArea
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public static List<Entity> getEntitiesInArea(ProgWidgetArea whitelistWidget, ProgWidgetArea blacklistWidget, World world, IEntitySelector whitelistFilter, IEntitySelector blacklistFilter){
if(whitelistWidget == null) return new ArrayList<Entity>();
Set<Entity> entities = new HashSet<Entity>();
ProgWidgetArea widget = whitelistWidget;
while(widget != null) {
entities.addAll(widget.getEntitiesWithinArea(world, whitelistFilter));
widget = (ProgWidgetArea)widget.getConnectedParameters()[0];
}
widget = blacklistWidget;
while(widget != null) {
entities.removeAll(widget.getEntitiesWithinArea(world, whitelistFilter));
widget = (ProgWidgetArea)widget.getConnectedParameters()[0];
}
if(blacklistFilter != null) {
Entity[] entArray = entities.toArray(new Entity[entities.size()]);
for(Entity entity : entArray) {
if(blacklistFilter.isEntityApplicable(entity)) {
entities.remove(entity);
}
}
}
return new ArrayList<Entity>(entities);
}
示例9: EntityBonnieAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityBonnieAINearestAttackableTarget(EntityBonnie p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityBonnieAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityBonnieAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityBonnieAINearestAttackableTarget.java
示例10: EntityCandyAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityCandyAINearestAttackableTarget(EntityCandy p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityCandyAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityCandyAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityCandyAINearestAttackableTarget.java
示例11: EntityChicaAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityChicaAINearestAttackableTarget(EntityChica p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityChicaAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityChicaAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityChicaAINearestAttackableTarget.java
示例12: EntityFredbearAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityFredbearAINearestAttackableTarget(EntityFredbear p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityFredbearAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityFredbearAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityFredbearAINearestAttackableTarget.java
示例13: EntitySpringbonnieAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntitySpringbonnieAINearestAttackableTarget(EntitySpringbonnie p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntitySpringbonnieAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntitySpringbonnieAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntitySpringbonnieAINearestAttackableTarget.java
示例14: EntityTBonnieAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityTBonnieAINearestAttackableTarget(EntityToyBonnie p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityTBonnieAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityTBonnieAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityTBonnieAINearestAttackableTarget.java
示例15: EntityWBonnieAINearestAttackableTarget
import net.minecraft.command.IEntitySelector; //導入方法依賴的package包/類
public EntityWBonnieAINearestAttackableTarget(EntityWBonnie p_i1665_1_, Class p_i1665_2_, int p_i1665_3_, boolean p_i1665_4_, boolean p_i1665_5_, final IEntitySelector p_i1665_6_)
{
super(p_i1665_1_, p_i1665_4_, p_i1665_5_);
this.targetClass = p_i1665_2_;
this.targetChance = p_i1665_3_;
this.theNearestAttackableTargetSorter = new EntityWBonnieAINearestAttackableTarget.Sorter(p_i1665_1_);
this.setMutexBits(1);
this.targetEntitySelector = new IEntitySelector()
{
public boolean isEntityApplicable(Entity p_82704_1_)
{
return !(p_82704_1_ instanceof EntityLivingBase) ? false : (p_i1665_6_ != null && !p_i1665_6_.isEntityApplicable(p_82704_1_) ? false : EntityWBonnieAINearestAttackableTarget.this.isSuitableTarget((EntityLivingBase)p_82704_1_, false));
}
};
}
開發者ID:Link1234Gamer,項目名稱:FiveNightsAtFreddysUniverseMod,代碼行數:16,代碼來源:EntityWBonnieAINearestAttackableTarget.java