本文整理汇总了Java中net.minecraft.entity.EntityAreaEffectCloud类的典型用法代码示例。如果您正苦于以下问题:Java EntityAreaEffectCloud类的具体用法?Java EntityAreaEffectCloud怎么用?Java EntityAreaEffectCloud使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EntityAreaEffectCloud类属于net.minecraft.entity包,在下文中一共展示了EntityAreaEffectCloud类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: func_190542_a
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
private void func_190542_a(ItemStack p_190542_1_, PotionType p_190542_2_)
{
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
entityareaeffectcloud.setOwner(this.getThrower());
entityareaeffectcloud.setRadius(3.0F);
entityareaeffectcloud.setRadiusOnUse(-0.5F);
entityareaeffectcloud.setWaitTime(10);
entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float)entityareaeffectcloud.getDuration());
entityareaeffectcloud.setPotion(p_190542_2_);
for (PotionEffect potioneffect : PotionUtils.getFullEffectsFromItem(p_190542_1_))
{
entityareaeffectcloud.addEffect(new PotionEffect(potioneffect));
}
NBTTagCompound nbttagcompound = p_190542_1_.getTagCompound();
if (nbttagcompound != null && nbttagcompound.hasKey("CustomPotionColor", 99))
{
entityareaeffectcloud.setColor(nbttagcompound.getInteger("CustomPotionColor"));
}
this.world.spawnEntityInWorld(entityareaeffectcloud);
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:EntityPotion.java
示例2: func_190741_do
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
private void func_190741_do()
{
Collection<PotionEffect> collection = this.getActivePotionEffects();
if (!collection.isEmpty())
{
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
entityareaeffectcloud.setRadius(2.5F);
entityareaeffectcloud.setRadiusOnUse(-0.5F);
entityareaeffectcloud.setWaitTime(10);
entityareaeffectcloud.setDuration(entityareaeffectcloud.getDuration() / 2);
entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float)entityareaeffectcloud.getDuration());
for (PotionEffect potioneffect : collection)
{
entityareaeffectcloud.addEffect(new PotionEffect(potioneffect));
}
this.world.spawnEntityInWorld(entityareaeffectcloud);
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:22,代码来源:EntityCreeper.java
示例3: onImpact
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Called when this EntityFireball hits a block or entity.
*/
protected void onImpact(RayTraceResult result)
{
if (result.entityHit == null || !result.entityHit.isEntityEqual(this.shootingEntity))
{
if (!this.world.isRemote)
{
List<EntityLivingBase> list = this.world.<EntityLivingBase>getEntitiesWithinAABB(EntityLivingBase.class, this.getEntityBoundingBox().expand(4.0D, 2.0D, 4.0D));
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY, this.posZ);
entityareaeffectcloud.setOwner(this.shootingEntity);
entityareaeffectcloud.setParticle(EnumParticleTypes.DRAGON_BREATH);
entityareaeffectcloud.setRadius(3.0F);
entityareaeffectcloud.setDuration(600);
entityareaeffectcloud.setRadiusPerTick((7.0F - entityareaeffectcloud.getRadius()) / (float)entityareaeffectcloud.getDuration());
entityareaeffectcloud.addEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE, 1, 1));
if (!list.isEmpty())
{
for (EntityLivingBase entitylivingbase : list)
{
double d0 = this.getDistanceSqToEntity(entitylivingbase);
if (d0 < 16.0D)
{
entityareaeffectcloud.setPosition(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ);
break;
}
}
}
this.world.playEvent(2006, new BlockPos(this.posX, this.posY, this.posZ), 0);
this.world.spawnEntityInWorld(entityareaeffectcloud);
this.setDead();
}
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:39,代码来源:EntityDragonFireball.java
示例4: getEntityTexture
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
@Nullable
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityAreaEffectCloud entity)
{
return null;
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:10,代码来源:RenderAreaEffectCloud.java
示例5: onImpact
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Called when this EntityFireball hits a block or entity.
*/
protected void onImpact(RayTraceResult result)
{
if (!this.worldObj.isRemote)
{
List<EntityLivingBase> list = this.worldObj.<EntityLivingBase>getEntitiesWithinAABB(EntityLivingBase.class, this.getEntityBoundingBox().expand(4.0D, 2.0D, 4.0D));
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.worldObj, this.posX, this.posY, this.posZ);
entityareaeffectcloud.setOwner(this.shootingEntity);
entityareaeffectcloud.setParticle(EnumParticleTypes.DRAGON_BREATH);
entityareaeffectcloud.setRadius(3.0F);
entityareaeffectcloud.setDuration(2400);
entityareaeffectcloud.setRadiusPerTick((7.0F - entityareaeffectcloud.getRadius()) / (float)entityareaeffectcloud.getDuration());
entityareaeffectcloud.addEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE, 1, 1));
if (!list.isEmpty())
{
for (EntityLivingBase entitylivingbase : list)
{
double d0 = this.getDistanceSqToEntity(entitylivingbase);
if (d0 < 16.0D)
{
entityareaeffectcloud.setPosition(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ);
break;
}
}
}
this.worldObj.playEvent(2006, new BlockPos(this.posX, this.posY, this.posZ), 0);
this.worldObj.spawnEntityInWorld(entityareaeffectcloud);
this.setDead();
}
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:36,代码来源:EntityDragonFireball.java
示例6: doLocalUpdate
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Gives the phase a chance to update its status.
* Called by dragon's onLivingUpdate. Only used when !worldObj.isRemote.
*/
public void doLocalUpdate()
{
++this.flameTicks;
if (this.flameTicks >= 200)
{
if (this.flameCount >= 4)
{
this.dragon.getPhaseManager().setPhase(PhaseList.TAKEOFF);
}
else
{
this.dragon.getPhaseManager().setPhase(PhaseList.SITTING_SCANNING);
}
}
else if (this.flameTicks == 10)
{
Vec3d vec3d = (new Vec3d(this.dragon.dragonPartHead.posX - this.dragon.posX, 0.0D, this.dragon.dragonPartHead.posZ - this.dragon.posZ)).normalize();
float f = 5.0F;
double d0 = this.dragon.dragonPartHead.posX + vec3d.xCoord * 5.0D / 2.0D;
double d1 = this.dragon.dragonPartHead.posZ + vec3d.zCoord * 5.0D / 2.0D;
double d2 = this.dragon.dragonPartHead.posY + (double)(this.dragon.dragonPartHead.height / 2.0F);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
while (this.dragon.world.isAirBlock(blockpos$mutableblockpos))
{
--d2;
blockpos$mutableblockpos.setPos(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
}
d2 = (double)(MathHelper.floor(d2) + 1);
this.areaEffectCloud = new EntityAreaEffectCloud(this.dragon.world, d0, d2, d1);
this.areaEffectCloud.setOwner(this.dragon);
this.areaEffectCloud.setRadius(5.0F);
this.areaEffectCloud.setDuration(200);
this.areaEffectCloud.setParticle(EnumParticleTypes.DRAGON_BREATH);
this.areaEffectCloud.addEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE));
this.dragon.world.spawnEntityInWorld(this.areaEffectCloud);
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:45,代码来源:PhaseSittingFlaming.java
示例7: onItemRightClick
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
public ActionResult<ItemStack> onItemRightClick(World itemStackIn, EntityPlayer worldIn, EnumHand playerIn)
{
List<EntityAreaEffectCloud> list = itemStackIn.<EntityAreaEffectCloud>getEntitiesWithinAABB(EntityAreaEffectCloud.class, worldIn.getEntityBoundingBox().expandXyz(2.0D), new Predicate<EntityAreaEffectCloud>()
{
public boolean apply(@Nullable EntityAreaEffectCloud p_apply_1_)
{
return p_apply_1_ != null && p_apply_1_.isEntityAlive() && p_apply_1_.getOwner() instanceof EntityDragon;
}
});
ItemStack itemstack = worldIn.getHeldItem(playerIn);
if (!list.isEmpty())
{
EntityAreaEffectCloud entityareaeffectcloud = (EntityAreaEffectCloud)list.get(0);
entityareaeffectcloud.setRadius(entityareaeffectcloud.getRadius() - 0.5F);
itemStackIn.playSound((EntityPlayer)null, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ITEM_BOTTLE_FILL_DRAGONBREATH, SoundCategory.NEUTRAL, 1.0F, 1.0F);
return new ActionResult(EnumActionResult.SUCCESS, this.turnBottleIntoItem(itemstack, worldIn, new ItemStack(Items.DRAGON_BREATH)));
}
else
{
RayTraceResult raytraceresult = this.rayTrace(itemStackIn, worldIn, true);
if (raytraceresult == null)
{
return new ActionResult(EnumActionResult.PASS, itemstack);
}
else
{
if (raytraceresult.typeOfHit == RayTraceResult.Type.BLOCK)
{
BlockPos blockpos = raytraceresult.getBlockPos();
if (!itemStackIn.isBlockModifiable(worldIn, blockpos) || !worldIn.canPlayerEdit(blockpos.offset(raytraceresult.sideHit), raytraceresult.sideHit, itemstack))
{
return new ActionResult(EnumActionResult.PASS, itemstack);
}
if (itemStackIn.getBlockState(blockpos).getMaterial() == Material.WATER)
{
itemStackIn.playSound(worldIn, worldIn.posX, worldIn.posY, worldIn.posZ, SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.NEUTRAL, 1.0F, 1.0F);
return new ActionResult(EnumActionResult.SUCCESS, this.turnBottleIntoItem(itemstack, worldIn, PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.WATER)));
}
}
return new ActionResult(EnumActionResult.PASS, itemstack);
}
}
}
开发者ID:sudofox,项目名称:Backmemed,代码行数:49,代码来源:ItemGlassBottle.java
示例8: doLocalUpdate
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Gives the phase a chance to update its status.
* Called by dragon's onLivingUpdate. Only used when !worldObj.isRemote.
*/
public void doLocalUpdate()
{
++this.flameTicks;
if (this.flameTicks >= 200)
{
if (this.flameCount >= 4)
{
this.dragon.getPhaseManager().setPhase(PhaseList.TAKEOFF);
}
else
{
this.dragon.getPhaseManager().setPhase(PhaseList.SITTING_SCANNING);
}
}
else if (this.flameTicks == 10)
{
Vec3d vec3d = (new Vec3d(this.dragon.dragonPartHead.posX - this.dragon.posX, 0.0D, this.dragon.dragonPartHead.posZ - this.dragon.posZ)).normalize();
float f = 5.0F;
double d0 = this.dragon.dragonPartHead.posX + vec3d.xCoord * 5.0D / 2.0D;
double d1 = this.dragon.dragonPartHead.posZ + vec3d.zCoord * 5.0D / 2.0D;
double d2 = this.dragon.dragonPartHead.posY + (double)(this.dragon.dragonPartHead.height / 2.0F);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(MathHelper.floor_double(d0), MathHelper.floor_double(d2), MathHelper.floor_double(d1));
while (this.dragon.worldObj.isAirBlock(blockpos$mutableblockpos) && d2 >= 0) //Forge: Fix infinite loop if ground is missing.
{
--d2;
blockpos$mutableblockpos.setPos(MathHelper.floor_double(d0), MathHelper.floor_double(d2), MathHelper.floor_double(d1));
}
d2 = (double)(MathHelper.floor_double(d2) + 1);
this.areaEffectCloud = new EntityAreaEffectCloud(this.dragon.worldObj, d0, d2, d1);
this.areaEffectCloud.setOwner(this.dragon);
this.areaEffectCloud.setRadius(5.0F);
this.areaEffectCloud.setDuration(200);
this.areaEffectCloud.setParticle(EnumParticleTypes.DRAGON_BREATH);
this.areaEffectCloud.addEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE));
this.dragon.worldObj.spawnEntityInWorld(this.areaEffectCloud);
}
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:45,代码来源:PhaseSittingFlaming.java
示例9: onItemRightClick
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
{
List<EntityAreaEffectCloud> list = worldIn.<EntityAreaEffectCloud>getEntitiesWithinAABB(EntityAreaEffectCloud.class, playerIn.getEntityBoundingBox().expandXyz(2.0D), new Predicate<EntityAreaEffectCloud>()
{
public boolean apply(@Nullable EntityAreaEffectCloud p_apply_1_)
{
return p_apply_1_ != null && p_apply_1_.isEntityAlive() && p_apply_1_.getOwner() instanceof EntityDragon;
}
});
if (!list.isEmpty())
{
EntityAreaEffectCloud entityareaeffectcloud = (EntityAreaEffectCloud)list.get(0);
entityareaeffectcloud.setRadius(entityareaeffectcloud.getRadius() - 0.5F);
worldIn.playSound((EntityPlayer)null, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ITEM_BOTTLE_FILL_DRAGONBREATH, SoundCategory.NEUTRAL, 1.0F, 1.0F);
return new ActionResult(EnumActionResult.SUCCESS, this.turnBottleIntoItem(itemStackIn, playerIn, new ItemStack(Items.DRAGON_BREATH)));
}
else
{
RayTraceResult raytraceresult = this.rayTrace(worldIn, playerIn, true);
if (raytraceresult == null)
{
return new ActionResult(EnumActionResult.PASS, itemStackIn);
}
else
{
if (raytraceresult.typeOfHit == RayTraceResult.Type.BLOCK)
{
BlockPos blockpos = raytraceresult.getBlockPos();
if (!worldIn.isBlockModifiable(playerIn, blockpos) || !playerIn.canPlayerEdit(blockpos.offset(raytraceresult.sideHit), raytraceresult.sideHit, itemStackIn))
{
return new ActionResult(EnumActionResult.PASS, itemStackIn);
}
if (worldIn.getBlockState(blockpos).getMaterial() == Material.WATER)
{
worldIn.playSound(playerIn, playerIn.posX, playerIn.posY, playerIn.posZ, SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.NEUTRAL, 1.0F, 1.0F);
return new ActionResult(EnumActionResult.SUCCESS, this.turnBottleIntoItem(itemStackIn, playerIn, new ItemStack(Items.POTIONITEM)));
}
}
return new ActionResult(EnumActionResult.PASS, itemStackIn);
}
}
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:48,代码来源:ItemGlassBottle.java
示例10: RenderManager
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
public RenderManager(TextureManager renderEngineIn, RenderItem itemRendererIn)
{
this.renderEngine = renderEngineIn;
this.entityRenderMap.put(EntityCaveSpider.class, new RenderCaveSpider(this));
this.entityRenderMap.put(EntitySpider.class, new RenderSpider(this));
this.entityRenderMap.put(EntityPig.class, new RenderPig(this, new ModelPig(), 0.7F));
this.entityRenderMap.put(EntitySheep.class, new RenderSheep(this, new ModelSheep2(), 0.7F));
this.entityRenderMap.put(EntityCow.class, new RenderCow(this, new ModelCow(), 0.7F));
this.entityRenderMap.put(EntityMooshroom.class, new RenderMooshroom(this, new ModelCow(), 0.7F));
this.entityRenderMap.put(EntityWolf.class, new RenderWolf(this, new ModelWolf(), 0.5F));
this.entityRenderMap.put(EntityChicken.class, new RenderChicken(this, new ModelChicken(), 0.3F));
this.entityRenderMap.put(EntityOcelot.class, new RenderOcelot(this, new ModelOcelot(), 0.4F));
this.entityRenderMap.put(EntityRabbit.class, new RenderRabbit(this, new ModelRabbit(), 0.3F));
this.entityRenderMap.put(EntitySilverfish.class, new RenderSilverfish(this));
this.entityRenderMap.put(EntityEndermite.class, new RenderEndermite(this));
this.entityRenderMap.put(EntityCreeper.class, new RenderCreeper(this));
this.entityRenderMap.put(EntityEnderman.class, new RenderEnderman(this));
this.entityRenderMap.put(EntitySnowman.class, new RenderSnowMan(this));
this.entityRenderMap.put(EntitySkeleton.class, new RenderSkeleton(this));
this.entityRenderMap.put(EntityWitch.class, new RenderWitch(this));
this.entityRenderMap.put(EntityBlaze.class, new RenderBlaze(this));
this.entityRenderMap.put(EntityPigZombie.class, new RenderPigZombie(this));
this.entityRenderMap.put(EntityZombie.class, new RenderZombie(this));
this.entityRenderMap.put(EntitySlime.class, new RenderSlime(this, new ModelSlime(16), 0.25F));
this.entityRenderMap.put(EntityMagmaCube.class, new RenderMagmaCube(this));
this.entityRenderMap.put(EntityGiantZombie.class, new RenderGiantZombie(this, new ModelZombie(), 0.5F, 6.0F));
this.entityRenderMap.put(EntityGhast.class, new RenderGhast(this));
this.entityRenderMap.put(EntitySquid.class, new RenderSquid(this, new ModelSquid(), 0.7F));
this.entityRenderMap.put(EntityVillager.class, new RenderVillager(this));
this.entityRenderMap.put(EntityIronGolem.class, new RenderIronGolem(this));
this.entityRenderMap.put(EntityBat.class, new RenderBat(this));
this.entityRenderMap.put(EntityGuardian.class, new RenderGuardian(this));
this.entityRenderMap.put(EntityShulker.class, new RenderShulker(this, new ModelShulker()));
this.entityRenderMap.put(EntityPolarBear.class, new RenderPolarBear(this, new ModelPolarBear(), 0.7F));
this.entityRenderMap.put(EntityDragon.class, new RenderDragon(this));
this.entityRenderMap.put(EntityEnderCrystal.class, new RenderEnderCrystal(this));
this.entityRenderMap.put(EntityWither.class, new RenderWither(this));
this.entityRenderMap.put(Entity.class, new RenderEntity(this));
this.entityRenderMap.put(EntityPainting.class, new RenderPainting(this));
this.entityRenderMap.put(EntityItemFrame.class, new RenderItemFrame(this, itemRendererIn));
this.entityRenderMap.put(EntityLeashKnot.class, new RenderLeashKnot(this));
this.entityRenderMap.put(EntityTippedArrow.class, new RenderTippedArrow(this));
this.entityRenderMap.put(EntitySpectralArrow.class, new RenderSpectralArrow(this));
this.entityRenderMap.put(EntitySnowball.class, new RenderSnowball(this, Items.SNOWBALL, itemRendererIn));
this.entityRenderMap.put(EntityEnderPearl.class, new RenderSnowball(this, Items.ENDER_PEARL, itemRendererIn));
this.entityRenderMap.put(EntityEnderEye.class, new RenderSnowball(this, Items.ENDER_EYE, itemRendererIn));
this.entityRenderMap.put(EntityEgg.class, new RenderSnowball(this, Items.EGG, itemRendererIn));
this.entityRenderMap.put(EntityPotion.class, new RenderPotion(this, itemRendererIn));
this.entityRenderMap.put(EntityExpBottle.class, new RenderSnowball(this, Items.EXPERIENCE_BOTTLE, itemRendererIn));
this.entityRenderMap.put(EntityFireworkRocket.class, new RenderSnowball(this, Items.FIREWORKS, itemRendererIn));
this.entityRenderMap.put(EntityLargeFireball.class, new RenderFireball(this, 2.0F));
this.entityRenderMap.put(EntitySmallFireball.class, new RenderFireball(this, 0.5F));
this.entityRenderMap.put(EntityDragonFireball.class, new RenderDragonFireball(this));
this.entityRenderMap.put(EntityWitherSkull.class, new RenderWitherSkull(this));
this.entityRenderMap.put(EntityShulkerBullet.class, new RenderShulkerBullet(this));
this.entityRenderMap.put(EntityItem.class, new RenderEntityItem(this, itemRendererIn));
this.entityRenderMap.put(EntityXPOrb.class, new RenderXPOrb(this));
this.entityRenderMap.put(EntityTNTPrimed.class, new RenderTNTPrimed(this));
this.entityRenderMap.put(EntityFallingBlock.class, new RenderFallingBlock(this));
this.entityRenderMap.put(EntityArmorStand.class, new RenderArmorStand(this));
this.entityRenderMap.put(EntityMinecartTNT.class, new RenderTntMinecart(this));
this.entityRenderMap.put(EntityMinecartMobSpawner.class, new RenderMinecartMobSpawner(this));
this.entityRenderMap.put(EntityMinecart.class, new RenderMinecart(this));
this.entityRenderMap.put(EntityBoat.class, new RenderBoat(this));
this.entityRenderMap.put(EntityFishHook.class, new RenderFish(this));
this.entityRenderMap.put(EntityAreaEffectCloud.class, new RenderAreaEffectCloud(this));
this.entityRenderMap.put(EntityHorse.class, new RenderHorse(this, new ModelHorse(), 0.75F));
this.entityRenderMap.put(EntityLightningBolt.class, new RenderLightningBolt(this));
this.playerRenderer = new RenderPlayer(this);
this.skinMap.put("default", this.playerRenderer);
this.skinMap.put("slim", new RenderPlayer(this, true));
net.minecraftforge.fml.client.registry.RenderingRegistry.loadEntityRenderers(this, this.entityRenderMap);
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:74,代码来源:RenderManager.java
示例11: doRender
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Renders the desired {@code T} type Entity.
*/
public void doRender(EntityAreaEffectCloud entity, double x, double y, double z, float entityYaw, float partialTicks)
{
super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:RenderAreaEffectCloud.java
示例12: getEntityTexture
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntityAreaEffectCloud entity)
{
return null;
}
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:RenderAreaEffectCloud.java
示例13: doLocalUpdate
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
/**
* Gives the phase a chance to update its status.
* Called by dragon's onLivingUpdate. Only used when !worldObj.isRemote.
*/
public void doLocalUpdate()
{
++this.flameTicks;
if (this.flameTicks >= 200)
{
if (this.flameCount >= 4)
{
this.dragon.getPhaseManager().setPhase(PhaseList.TAKEOFF);
}
else
{
this.dragon.getPhaseManager().setPhase(PhaseList.SITTING_SCANNING);
}
}
else if (this.flameTicks == 10)
{
Vec3d vec3d = (new Vec3d(this.dragon.dragonPartHead.posX - this.dragon.posX, 0.0D, this.dragon.dragonPartHead.posZ - this.dragon.posZ)).normalize();
float f = 5.0F;
double d0 = this.dragon.dragonPartHead.posX + vec3d.xCoord * 5.0D / 2.0D;
double d1 = this.dragon.dragonPartHead.posZ + vec3d.zCoord * 5.0D / 2.0D;
double d2 = this.dragon.dragonPartHead.posY + (double)(this.dragon.dragonPartHead.height / 2.0F);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(MathHelper.floor_double(d0), MathHelper.floor_double(d2), MathHelper.floor_double(d1));
while (this.dragon.worldObj.isAirBlock(blockpos$mutableblockpos))
{
--d2;
blockpos$mutableblockpos.setPos(MathHelper.floor_double(d0), MathHelper.floor_double(d2), MathHelper.floor_double(d1));
}
d2 = (double)(MathHelper.floor_double(d2) + 1);
this.areaEffectCloud = new EntityAreaEffectCloud(this.dragon.worldObj, d0, d2, d1);
this.areaEffectCloud.setOwner(this.dragon);
this.areaEffectCloud.setRadius(5.0F);
this.areaEffectCloud.setDuration(200);
this.areaEffectCloud.setParticle(EnumParticleTypes.DRAGON_BREATH);
this.areaEffectCloud.addEffect(new PotionEffect(MobEffects.INSTANT_DAMAGE));
this.dragon.worldObj.spawnEntityInWorld(this.areaEffectCloud);
}
}
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:45,代码来源:PhaseSittingFlaming.java
示例14: onImpact
import net.minecraft.entity.EntityAreaEffectCloud; //导入依赖的package包/类
@Override
protected void onImpact(RayTraceResult movingObject)
{
if (ticksExisted > 10)
{
if(!world.isRemote)
for(int x = getPosition().getX() -4; x < getPosition().getX() + 4; x++)
for(int z = getPosition().getZ() - 4; z < getPosition().getZ() + 4; z++)
if(!(world.getBiome(new BlockPos(x, 0, z)) instanceof IDreadlandsBiome))
{
Biome b = ACBiomes.dreadlands;
Chunk c = world.getChunkFromBlockCoords(getPosition());
c.getBiomeArray()[(z & 0xF) << 4 | x & 0xF] = (byte)Biome.getIdForBiome(b);
c.setModified(true);
PacketDispatcher.sendToDimension(new CleansingRitualMessage(x, z, Biome.getIdForBiome(b)), world.provider.getDimension());
}
if (movingObject.entityHit != null) if (shootingEntity instanceof EntityLivingBase)
{
shootingEntity.attackEntityAsMob(movingObject.entityHit);
movingObject.entityHit.hurtResistantTime = 0;
}
List<EntityLivingBase> list = world.getEntitiesWithinAABB(EntityLivingBase.class, getEntityBoundingBox().grow(8.0D));
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(world, posX, posY, posZ);
// entityareaeffectcloud.setOwner((EntityFriendlyCreature)this.shootingEntity);
entityareaeffectcloud.setParticle(EnumParticleTypes.FLAME);
entityareaeffectcloud.addEffect(new PotionEffect(AbyssalCraftAPI.dread_plague, 400));
entityareaeffectcloud.setRadius(2.0F);
entityareaeffectcloud.setDuration(200 + rand.nextInt(200));
entityareaeffectcloud.setRadiusPerTick((3F - entityareaeffectcloud.getRadius()) / entityareaeffectcloud.getDuration());
if (!list.isEmpty()) for (EntityLivingBase entitylivingbase : list)
{
double d0 = getDistanceSqToEntity(entitylivingbase);
if (shootingEntity != null && d0 < 64.0D) entityareaeffectcloud.setPosition(entitylivingbase.posX, entitylivingbase.posY, entitylivingbase.posZ);
}
for (int k = 0; k < 200; ++k)
{
float f2 = rand.nextFloat() * 4.0F;
float f3 = rand.nextFloat() * ((float)Math.PI * 2F);
double d3 = MathHelper.cos(f3) * f2;
double d4 = 0.01D + rand.nextDouble() * 0.5D;
double d5 = MathHelper.sin(f3) * f2;
world.spawnParticle(EnumParticleTypes.FLAME, getPosition().getX() + d3 * 0.1D, getPosition().getY() + 0.3D, getPosition().getZ() + d5 * 0.1D, d3 * f2, d4, d5 * f2, new int[0]);
}
world.playSound((EntityPlayer)null, getPosition(), SoundEvents.ENTITY_ENDERDRAGON_FIREBALL_EPLD, SoundCategory.MASTER, 1.0F, world.rand.nextFloat() * 0.1F + 0.9F);
if (!world.isRemote) world.spawnEntity(entityareaeffectcloud);
world.newExplosion(this, posX, posY + 1.0D, posZ, 3.0F, false, false);
setDead();
}
}
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:57,代码来源:EntityDreadedCharge.java
注:本文中的net.minecraft.entity.EntityAreaEffectCloud类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论