本文整理匯總了Java中net.minecraft.entity.monster.EntityBlaze類的典型用法代碼示例。如果您正苦於以下問題:Java EntityBlaze類的具體用法?Java EntityBlaze怎麽用?Java EntityBlaze使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
EntityBlaze類屬於net.minecraft.entity.monster包,在下文中一共展示了EntityBlaze類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addCollisionBoxToList
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
@SuppressWarnings("deprecation")
@Override
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean p_185477_7_) {
if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.UNDEAD)) {
collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
}
if (entityIn instanceof EntityLivingBase && (((EntityLivingBase) entityIn).getCreatureAttribute() == EnumCreatureAttribute.ARTHROPOD)) {
entityIn.attackEntityFrom(DamageSource.MAGIC, 1);
}
if (entityIn instanceof EntityBlaze) {
collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
}
if (entityIn instanceof EntityEnderman) {
collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
}
if (entityIn instanceof EntityGhast) {
collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
}
if (entityIn instanceof EntityVex) {
collidingBoxes.add(new AxisAlignedBB(pos).expand(0, 255, 0));
}
}
示例2: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(MovingObjectPosition p_70184_1_)
{
if (p_70184_1_.entityHit != null)
{
int i = 0;
if (p_70184_1_.entityHit instanceof EntityBlaze)
{
i = 3;
}
p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
}
for (int j = 0; j < 8; ++j)
{
this.worldObj.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
示例3: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(RayTraceResult result)
{
if (result.entityHit != null)
{
int i = 0;
if (result.entityHit instanceof EntityBlaze)
{
i = 3;
}
result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
}
if (!this.world.isRemote)
{
this.world.setEntityState(this, (byte)3);
this.setDead();
}
}
示例4: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(RayTraceResult result)
{
if (result.entityHit != null)
{
int i = 0;
if (result.entityHit instanceof EntityBlaze)
{
i = 3;
}
result.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)i);
}
for (int j = 0; j < 8; ++j)
{
this.worldObj.spawnParticle(EnumParticleTypes.SNOWBALL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D, new int[0]);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
示例5: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
byte var2 = 0;
if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
{
var2 = 3;
}
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)var2);
}
for (int var3 = 0; var3 < 8; ++var3)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isClient)
{
this.setDead();
}
}
示例6: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
@Override
protected void onImpact(MovingObjectPosition p_70184_1_) {
if (p_70184_1_.entityHit != null) {
byte b0 = 0;
if (p_70184_1_.entityHit instanceof EntityBlaze) {
b0 = 3;
}
p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), b0);
}
for (int i = 0; i < 8; ++i) {
this.worldObj.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (isServer()) {
this.setDead();
if (isServer()) {
this.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 2.5F, true);
}
}
}
示例7: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
@Override
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
byte b0 = 0;
if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
{
b0 = 3;
}
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
}
for (int i = 0; i < 8; ++i)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
示例8: livingKilled
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
@SubscribeEvent
public void livingKilled(LivingDeathEvent event) {
Entity killer = event.source.getEntity();
EntityLivingBase target = event.entityLiving;
if (isServer() && killer != null && killer instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) killer;
if (target instanceof EntityWither) {
DiscoveryManager.unlockItem(QADiscoveries.Item.STAR.get().getKey(), player, false);
} else if (target instanceof EntityZombie) {
ItemStack equip = ((EntityZombie) target).getEquipmentInSlot(0);
if (equip != null && equip.getItem() instanceof ItemSword)
DiscoveryManager.unlockItem(QADiscoveries.Item.SWORD.get().getKey(), player, false);
} else if (target instanceof EntityBlaze) {
DiscoveryManager.unlockItem(QADiscoveries.Item.TOOLS.get().getKey(), player, false);
}
}
}
示例9: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
protected void onImpact(MovingObjectPosition p_70184_1_)
{
if (p_70184_1_.entityHit != null)
{
byte b0 = 0;
if (p_70184_1_.entityHit instanceof EntityBlaze)
{
b0 = 3;
}
p_70184_1_.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
}
for (int i = 0; i < 8; ++i)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
示例10: init
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
private static void init() {
addDrop(EntityCreeper.class, SkillBase.armorBreak);
addDrop(EntityIronGolem.class, SkillBase.armorBreak);
addDrop(EntitySilverfish.class, SkillBase.dash);
addDrop(EntityHorse.class, SkillBase.dash);
addDrop(EntityEnderman.class, SkillBase.dodge);
addDrop(EntityKeese.class, SkillBase.dodge);
addDrop(EntitySpider.class, SkillBase.endingBlow);
addDrop(EntityCaveSpider.class, SkillBase.leapingBlow);
addDrop(EntityMagmaCube.class, SkillBase.leapingBlow);
addDrop(EntityPigZombie.class, SkillBase.parry);
addDrop(EntityOcelot.class, SkillBase.parry);
addDrop(EntityOctorok.class, SkillBase.risingCut);
addDrop(EntityBlaze.class, SkillBase.spinAttack);
addDrop(EntityDarknut.class, SkillBase.spinAttack);
addDrop(EntityZombie.class, SkillBase.swordBasic);
addDrop(EntitySkeleton.class, SkillBase.swordBasic);
addDrop(EntityGhast.class, SkillBase.swordBeam);
addDrop(EntityWitch.class, SkillBase.swordBeam);
addDrop(EntityWizzrobe.class, SkillBase.swordBreak);
}
示例11: func_70184_a
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
protected void func_70184_a(MovingObjectPosition p_70184_1_) {
if(p_70184_1_.field_72308_g != null) {
byte var2 = 0;
if(p_70184_1_.field_72308_g instanceof EntityBlaze) {
var2 = 3;
}
p_70184_1_.field_72308_g.func_70097_a(DamageSource.func_76356_a(this, this.func_85052_h()), (float)var2);
}
for(int var3 = 0; var3 < 8; ++var3) {
this.field_70170_p.func_72869_a("snowballpoof", this.field_70165_t, this.field_70163_u, this.field_70161_v, 0.0D, 0.0D, 0.0D);
}
if(!this.field_70170_p.field_72995_K) {
this.func_70106_y();
}
}
示例12: onImpact
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
/**
* Called when this EntityThrowable hits a block or entity.
*/
protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
{
if (par1MovingObjectPosition.entityHit != null)
{
byte b0 = 0;
if (par1MovingObjectPosition.entityHit instanceof EntityBlaze)
{
b0 = 3;
}
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float)b0);
}
for (int i = 0; i < 8; ++i)
{
this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D);
}
if (!this.worldObj.isRemote)
{
this.setDead();
}
}
示例13: itemInteractionForEntity
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
@Override
public boolean itemInteractionForEntity(ItemStack ext, EntityPlayer player, EntityLivingBase target){
boolean result=false;
if(player.isBurning()){
player.extinguish();
result=true;
}else if(target.isBurning()){
target.extinguish();
result=true;
}else if(target instanceof EntityBlaze){
target.attackEntityFrom(DamageSource.magic, 10);
result=true;
}
if(result){
ext.damageItem(1, target);
for(int i=0; i<10; i++){
target.worldObj.spawnParticle("explode", target.posX, target.posY, target.posZ, 0,0.1,0);
}
}
return result;
}
示例14: entityUndeadCheck
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
public static boolean entityUndeadCheck(MovingObjectPosition movObjPos) {
boolean result = false;
if ((movObjPos.entityHit instanceof EntityZombie)) {
result = true;
}
if ((movObjPos.entityHit instanceof EntitySkeleton)) {
result = true;
}
if ((movObjPos.entityHit instanceof EntityPigZombie)) {
result = true;
}
if ((!(movObjPos.entityHit instanceof EntityBlaze))
|| ((!(movObjPos.entityHit instanceof EntityWitherSkull)) || ((!(movObjPos.entityHit instanceof EntityWither)) || ((movObjPos.entityHit instanceof EntityGhast)))))
;
return result;
}
示例15: afterCraterFormed
import net.minecraft.entity.monster.EntityBlaze; //導入依賴的package包/類
public void afterCraterFormed(World world, Random random, int i, int j, int k) {
if (this.crashSize >= MeteorsMod.instance.MinMeteorSizeForPortal) {
createPortal(world, i, j, k, random.nextBoolean());
}
int blazes = random.nextInt(3);
ArrayList arraylist = new ArrayList();
arraylist.addAll(this.explosion.affectedBlockPositions);
for (int j1 = arraylist.size() - 1; (j1 >= 0) &&
(blazes > 0); j1--)
{
ChunkPosition chunkposition1 = (ChunkPosition)arraylist.get(j1);
int l = chunkposition1.chunkPosX;
int j11 = chunkposition1.chunkPosY;
int l1 = chunkposition1.chunkPosZ;
boolean j2 = world.isAirBlock(l, j11, l1);
Block k2 = world.getBlock(l, j11 - 1, l1);
if (j2 && k2.isOpaqueCube() && (random.nextInt(10) > 4)) {
EntityBlaze blaze = new EntityBlaze(world);
blaze.setPositionAndRotation(l, j11, l1, 0.0F, 0.0F);
world.spawnEntityInWorld(blaze);
blazes--;
}
}
}