當前位置: 首頁>>代碼示例>>Java>>正文


Java IRangedAttackMob類代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:21,代碼來源:EntityAIArrowAttack.java

示例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);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:21,代碼來源:EntityAIAttackRanged.java

示例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);
    }
}
 
開發者ID:4Space,項目名稱:4Space-5,代碼行數:21,代碼來源:EntityAIArrowAttack.java

示例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);
    }
}
 
開發者ID:DracoAnimus,項目名稱:Coding,代碼行數:19,代碼來源:EntityAISpearAttack.java

示例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);
    }
}
 
開發者ID:MinecraftModArchive,項目名稱:Herdcraft,代碼行數:24,代碼來源:EntityAIHerdArrowAttack.java

示例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);
    }
}
 
開發者ID:MinecraftModdedClients,項目名稱:Resilience-Client-Source,代碼行數:21,代碼來源:EntityAIArrowAttack.java

示例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);
    }
}
 
開發者ID:NovaViper,項目名稱:ZeroQuest,代碼行數:21,代碼來源:EntityAICustomArrowAttack.java

示例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);
	}
}
 
開發者ID:NovaViper,項目名稱:ZeroQuest,代碼行數:18,代碼來源:EntityAIIceAttack.java

示例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);
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:21,代碼來源:EntityAIArrowAttack.java

示例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);
	}
}
 
開發者ID:TheDaemoness,項目名稱:IceAndShadow2,代碼行數:19,代碼來源:EntityAINyxRangedAttack.java

示例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);
			}
		}
	}
}
 
開發者ID:Maxwell-lt,項目名稱:MobBlocker,代碼行數:22,代碼來源:TileEntityChunkProtector.java

示例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);
			}
		}
	}
}
 
開發者ID:Maxwell-lt,項目名稱:MobBlocker,代碼行數:22,代碼來源:TileEntityAreaProtector.java

示例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);
   }
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:16,代碼來源:EntityAIArrowAttack.java

示例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);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderZoo,代碼行數:13,代碼來源:EntityAIRangedAttack.java

示例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);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderZoo,代碼行數:15,代碼來源:EntityAIMountedArrowAttack.java


注:本文中的net.minecraft.entity.IRangedAttackMob類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。