本文整理匯總了Java中net.minecraft.entity.IRangedAttackMob類的典型用法代碼示例。如果您正苦於以下問題:Java IRangedAttackMob類的具體用法?Java IRangedAttackMob怎麽用?Java IRangedAttackMob使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IRangedAttackMob類屬於net.minecraft.entity包,在下文中一共展示了IRangedAttackMob類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: EntityAIArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIArrowAttack(IRangedAttackMob attacker, double movespeed, int p_i1650_4_, int maxAttackTime, float maxAttackDistanceIn)
{
this.rangedAttackTime = -1;
if (!(attacker instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = attacker;
this.entityHost = (EntityLiving)attacker;
this.entityMoveSpeed = movespeed;
this.field_96561_g = p_i1650_4_;
this.maxRangedAttackTime = maxAttackTime;
this.field_96562_i = maxAttackDistanceIn;
this.maxAttackDistance = maxAttackDistanceIn * maxAttackDistanceIn;
this.setMutexBits(3);
}
}
示例2: EntityAIAttackRanged
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIAttackRanged(IRangedAttackMob attacker, double movespeed, int p_i1650_4_, int maxAttackTime, float maxAttackDistanceIn)
{
this.rangedAttackTime = -1;
if (!(attacker instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = attacker;
this.entityHost = (EntityLiving)attacker;
this.entityMoveSpeed = movespeed;
this.attackIntervalMin = p_i1650_4_;
this.maxRangedAttackTime = maxAttackTime;
this.attackRadius = maxAttackDistanceIn;
this.maxAttackDistance = maxAttackDistanceIn * maxAttackDistanceIn;
this.setMutexBits(3);
}
}
示例3: EntityAIArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIArrowAttack(IRangedAttackMob par1IRangedAttackMob, double par2, int par4, int par5, float par6)
{
this.rangedAttackTime = -1;
if (!(par1IRangedAttackMob instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = par1IRangedAttackMob;
this.entityHost = (EntityLiving) par1IRangedAttackMob;
this.entityMoveSpeed = par2;
this.field_96561_g = par4;
this.maxRangedAttackTime = par5;
this.field_96562_i = par6;
this.field_82642_h = par6 * par6;
this.setMutexBits(3);
}
}
示例4: EntityAISpearAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAISpearAttack(IRangedAttackMob entityAttacker, double targetSpeed, int p_i1650_4_,
int attackWaitTime, float p_i1650_6_) {
this.rangedAttackTime = -1;
if (!(entityAttacker instanceof EntityLivingBase)) {
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else {
this.rangedAttackEntityHost = entityAttacker;
this.entityHost = (EntityLiving)entityAttacker;
this.entityMoveSpeed = targetSpeed;
this.field_96561_g = p_i1650_4_;
this.maxRangedAttackTime = attackWaitTime;
this.field_96562_i = p_i1650_6_;
this.field_82642_h = p_i1650_6_ * p_i1650_6_;
this.setMutexBits(3);
}
}
示例5: EntityAIHerdArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIHerdArrowAttack(IRangedAttackMob host, double moveSpeed, int minRangedAttackTime, int maxRangedAttackTime, float attackRange, int cautionAngle, boolean clockwise, boolean interuptableByRange)
{
this.rangedAttackTime = -1;
if (!(host instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = host;
this.entityHost = (EntityLiving)host;
this.entityMoveSpeed = moveSpeed;
this.minRangedAttackTime = minRangedAttackTime;
this.maxRangedAttackTime = maxRangedAttackTime;
this.attackRange = attackRange;
this.attackRangeSquared = attackRange * attackRange;
this.cautionAngle = cautionAngle;
this.clockwise = clockwise;
this.interuptableByRange = interuptableByRange;
this.setMutexBits(3);
}
}
示例6: EntityAIArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIArrowAttack(IRangedAttackMob par1IRangedAttackMob, double par2, int par4, int par5, float par6)
{
this.rangedAttackTime = -1;
if (!(par1IRangedAttackMob instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = par1IRangedAttackMob;
this.entityHost = (EntityLiving)par1IRangedAttackMob;
this.entityMoveSpeed = par2;
this.field_96561_g = par4;
this.maxRangedAttackTime = par5;
this.field_96562_i = par6;
this.field_82642_h = par6 * par6;
this.setMutexBits(3);
}
}
示例7: EntityAICustomArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAICustomArrowAttack(IRangedAttackMob p_i1650_1_, double p_i1650_2_, int p_i1650_4_, int p_i1650_5_, float p_i1650_6_)
{
this.rangedAttackTime = -1;
if (!(p_i1650_1_ instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = p_i1650_1_;
this.entityHost = (EntityLiving)p_i1650_1_;
this.entityMoveSpeed = p_i1650_2_;
this.field_96561_g = p_i1650_4_;
this.maxRangedAttackTime = p_i1650_5_;
this.field_96562_i = p_i1650_6_;
this.field_82642_h = p_i1650_6_ * p_i1650_6_;
this.setMutexBits(8);
}
}
示例8: EntityAIIceAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIIceAttack(IRangedAttackMob p_i1650_1_, double p_i1650_2_, int p_i1650_4_, int p_i1650_5_, float p_i1650_6_) {
this.rangedAttackTime = -1;
if (!(p_i1650_1_ instanceof EntityLivingBase)) {
throw new IllegalArgumentException("IceAttackGoal requires Mob implements RangedAttackMob");
}
else {
this.rangedAttackEntityHost = p_i1650_1_;
this.entityHost = (EntityZertumEntity) p_i1650_1_;
this.entityMoveSpeed = p_i1650_2_;
this.field_96561_g = p_i1650_4_;
this.maxRangedAttackTime = p_i1650_5_;
this.field_96562_i = p_i1650_6_;
this.maxAttackDistance = p_i1650_6_ * p_i1650_6_;
this.setMutexBits(4);
}
}
示例9: EntityAIArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIArrowAttack(IRangedAttackMob p_i1650_1_, double p_i1650_2_, int p_i1650_4_, int p_i1650_5_, float p_i1650_6_)
{
this.rangedAttackTime = -1;
if (!(p_i1650_1_ instanceof EntityLivingBase))
{
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
}
else
{
this.rangedAttackEntityHost = p_i1650_1_;
this.entityHost = (EntityLiving)p_i1650_1_;
this.entityMoveSpeed = p_i1650_2_;
this.field_96561_g = p_i1650_4_;
this.maxRangedAttackTime = p_i1650_5_;
this.field_96562_i = p_i1650_6_;
this.field_82642_h = p_i1650_6_ * p_i1650_6_;
this.setMutexBits(3);
}
}
示例10: EntityAINyxRangedAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAINyxRangedAttack(IRangedAttackMob par1IRangedAttackMob, double par2, int par4, int par5, float par6,
boolean los) {
rangedAttackTime = -1;
if (!(par1IRangedAttackMob instanceof EntityLivingBase))
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
else {
rangedAttackEntityHost = par1IRangedAttackMob;
entityHost = (EntityLiving) par1IRangedAttackMob;
entityMoveSpeed = par2;
minRangedAttackTime = par4;
maxRangedAttackTime = par5;
range = par6;
rangeSq = par6 * par6;
reqLOS = los;
setMutexBits(3);
}
}
示例11: killArrows
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
/**
* Destroys skeleton arrows in the protected area
* Checks whether the arrow was shot by a class deriving from IRangedAttackMob
* Sets the arrow on fire for visual effect by default
* An arrow already on fire is killed
* The effect of this is that the arrow, for one tick, is engulfed in flame, as it looks strange to have the arrow disappear for no reason
* @param chunkBounds AxisAlignedBB in which block should act
*/
private void killArrows(AxisAlignedBB chunkBounds) {
List<EntityArrow> list = world.getEntitiesWithinAABB(EntityArrow.class, chunkBounds);
for (EntityArrow arrow : list) {
if (arrow.shootingEntity instanceof IRangedAttackMob) {
if (arrow.isBurning()) {
arrow.setDead();
} else {
arrow.setFire(1);
arrow.addVelocity(-arrow.motionX, 0, -arrow.motionZ);
}
}
}
}
示例12: killArrows
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
/**
* Destroys skeleton arrows in the protected area
* Checks whether the arrow was shot by a class deriving from IRangedAttackMob
* Sets the arrow on fire for visual effect by default
* An arrow already on fire is killed
* The effect of this is that the arrow, for one tick, is engulfed in flame, as it looks strange to have the arrow disappear for no reason
* @param areaBounds AxisAlignedBB in which block should act
*/
private void killArrows(AxisAlignedBB areaBounds) {
List<EntityArrow> list = world.getEntitiesWithinAABB(EntityArrow.class, areaBounds);
for (EntityArrow arrow : list) {
if (arrow.shootingEntity instanceof IRangedAttackMob) {
if (arrow.isBurning()) {
arrow.setDead();
} else {
arrow.setFire(1);
arrow.addVelocity(-arrow.motionX, 0, -arrow.motionZ);
}
}
}
}
示例13: EntityAIArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIArrowAttack(IRangedAttackMob p_i1650_1_, double p_i1650_2_, int p_i1650_4_, int p_i1650_5_, float p_i1650_6_) {
this.field_75320_d = -1;
if(!(p_i1650_1_ instanceof EntityLivingBase)) {
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
} else {
this.field_82641_b = p_i1650_1_;
this.field_75322_b = (EntityLiving)p_i1650_1_;
this.field_75321_e = p_i1650_2_;
this.field_96561_g = p_i1650_4_;
this.field_75325_h = p_i1650_5_;
this.field_96562_i = p_i1650_6_;
this.field_82642_h = p_i1650_6_ * p_i1650_6_;
this.func_75248_a(3);
}
}
示例14: EntityAIRangedAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIRangedAttack(IRangedAttackMob host, double moveSpeed, int minTimeBetweenAttacks, int maxTimeBetweenAttacks, float range) {
timeUntilNextAttack = -1;
rangedAttackEntityHost = host;
entityHost = (EntityLiving) host;
entityMoveSpeed = moveSpeed;
minRangedAttackTime = minTimeBetweenAttacks;
maxRangedAttackTime = maxTimeBetweenAttacks;
attackRange = range;
attackRangeSq = attackRange * attackRange;
setMutexBits(3);
}
示例15: EntityAIMountedArrowAttack
import net.minecraft.entity.IRangedAttackMob; //導入依賴的package包/類
public EntityAIMountedArrowAttack(IRangedAttackMob host, double moveSpeed, double mountedEntityMoveSpeed, int minAttackTime, int maxAttackTime,
float attackRange, boolean useRunAwayTactic) {
timeUntilNextAttack = -1;
rangedAttackEntityHost = host;
entityHost = (EntityLiving) host;
entityMoveSpeed = moveSpeed;
this.mountedEntityMoveSpeed = mountedEntityMoveSpeed;
minRangedAttackTime = minAttackTime;
maxRangedAttackTime = maxAttackTime;
this.attackRange = attackRange;
attackRangeSq = attackRange * attackRange;
this.useRunAwayTactic = useRunAwayTactic;
setMutexBits(3);
}