当前位置: 首页>>代码示例>>Java>>正文


Java EntityWitherSkull类代码示例

本文整理汇总了Java中net.minecraft.entity.projectile.EntityWitherSkull的典型用法代码示例。如果您正苦于以下问题:Java EntityWitherSkull类的具体用法?Java EntityWitherSkull怎么用?Java EntityWitherSkull使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EntityWitherSkull类属于net.minecraft.entity.projectile包,在下文中一共展示了EntityWitherSkull类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: launchWitherSkullToCoords

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Launches a Wither skull toward (par2, par4, par6)
 */
private void launchWitherSkullToCoords(int p_82209_1_, double x, double y, double z, boolean invulnerable)
{
    this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, new BlockPos(this), 0);
    double d0 = this.func_82214_u(p_82209_1_);
    double d1 = this.func_82208_v(p_82209_1_);
    double d2 = this.func_82213_w(p_82209_1_);
    double d3 = x - d0;
    double d4 = y - d1;
    double d5 = z - d2;
    EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.worldObj, this, d3, d4, d5);

    if (invulnerable)
    {
        entitywitherskull.setInvulnerable(true);
    }

    entitywitherskull.posY = d1;
    entitywitherskull.posX = d0;
    entitywitherskull.posZ = d2;
    this.worldObj.spawnEntityInWorld(entitywitherskull);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:EntityWither.java

示例2: doRender

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity>) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doe
 */
public void doRender(EntityWitherSkull entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.disableCull();
    float f = this.func_82400_a(entity.prevRotationYaw, entity.rotationYaw, partialTicks);
    float f1 = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
    GlStateManager.translate((float)x, (float)y, (float)z);
    float f2 = 0.0625F;
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
    GlStateManager.enableAlpha();
    this.bindEntityTexture(entity);
    this.skeletonHeadModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, f2);
    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:23,代码来源:RenderWitherSkull.java

示例3: launchWitherSkullToCoords

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Launches a Wither skull toward (par2, par4, par6)
 */
private void launchWitherSkullToCoords(int p_82209_1_, double x, double y, double z, boolean invulnerable)
{
    this.world.playEvent((EntityPlayer)null, 1024, new BlockPos(this), 0);
    double d0 = this.getHeadX(p_82209_1_);
    double d1 = this.getHeadY(p_82209_1_);
    double d2 = this.getHeadZ(p_82209_1_);
    double d3 = x - d0;
    double d4 = y - d1;
    double d5 = z - d2;
    EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.world, this, d3, d4, d5);

    if (invulnerable)
    {
        entitywitherskull.setInvulnerable(true);
    }

    entitywitherskull.posY = d1;
    entitywitherskull.posX = d0;
    entitywitherskull.posZ = d2;
    this.world.spawnEntityInWorld(entitywitherskull);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:25,代码来源:EntityWither.java

示例4: launchWitherSkullToCoords

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Launches a Wither skull toward (par2, par4, par6)
 */
private void launchWitherSkullToCoords(int p_82209_1_, double x, double y, double z, boolean invulnerable)
{
    this.worldObj.playEvent((EntityPlayer)null, 1024, new BlockPos(this), 0);
    double d0 = this.getHeadX(p_82209_1_);
    double d1 = this.getHeadY(p_82209_1_);
    double d2 = this.getHeadZ(p_82209_1_);
    double d3 = x - d0;
    double d4 = y - d1;
    double d5 = z - d2;
    EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.worldObj, this, d3, d4, d5);

    if (invulnerable)
    {
        entitywitherskull.setInvulnerable(true);
    }

    entitywitherskull.posY = d1;
    entitywitherskull.posX = d0;
    entitywitherskull.posZ = d2;
    this.worldObj.spawnEntityInWorld(entitywitherskull);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:25,代码来源:EntityWither.java

示例5: onItemRightClick

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
@Override
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World world, EntityPlayer player, EnumHand hand) {
	if (!world.isRemote) {
		if (cooldown <= 0) {
			if (WarsMod.getDonators().contains(player.getName())) {
				if (player instanceof EntityPlayerMP && ItemArmorMod.hasFullSuit(player, WarsItems.chaosArmor)) {
					Vec3d look = player.getLookVec();
					EntityWitherSkull skull = new EntityWitherSkull(world, player, 1, 1, 1);
					skull.setPosition(player.posX + look.xCoord * 1, player.posY + look.yCoord * 2, player.posZ + look.zCoord * 1);
					skull.accelerationX = look.xCoord * 0.1;
					skull.accelerationY = look.yCoord * 0.1;
					skull.accelerationZ = look.zCoord * 0.1;
					world.spawnEntityInWorld(skull);
					cooldown = 40;
					return new ActionResult(EnumActionResult.SUCCESS, stack);
				}
			} else {
				player.addChatMessage(new TextComponentTranslation("class.donatoronly"));
				return new ActionResult(EnumActionResult.FAIL, stack);
			}
		}
	}
	return new ActionResult(EnumActionResult.PASS, stack);
}
 
开发者ID:The-Fireplace-Minecraft-Mods,项目名称:Wars-Mod,代码行数:25,代码来源:ItemChaosSword.java

示例6: func_82209_a

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
private void func_82209_a(int par1, double par2, double par4, double par6, boolean par8)
{
    this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
    double var9 = this.func_82214_u(par1);
    double var11 = this.func_82208_v(par1);
    double var13 = this.func_82213_w(par1);
    double var15 = par2 - var9;
    double var17 = par4 - var11;
    double var19 = par6 - var13;
    EntityWitherSkull var21 = new EntityWitherSkull(this.worldObj, this, var15, var17, var19);

    if (par8)
    {
        var21.setInvulnerable(true);
    }

    var21.posY = var11;
    var21.posX = var9;
    var21.posZ = var13;
    this.worldObj.spawnEntityInWorld(var21);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:EntityWither.java

示例7: doRender

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
 */
public void doRender(EntityWitherSkull par1EntityWitherSkull, double par2, double par4, double par6, float par8, float par9)
{
    GL11.glPushMatrix();
    GL11.glDisable(GL11.GL_CULL_FACE);
    float var10 = this.func_82400_a(par1EntityWitherSkull.prevRotationYaw, par1EntityWitherSkull.rotationYaw, par9);
    float var11 = par1EntityWitherSkull.prevRotationPitch + (par1EntityWitherSkull.rotationPitch - par1EntityWitherSkull.prevRotationPitch) * par9;
    GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    float var12 = 0.0625F;
    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    GL11.glScalef(-1.0F, -1.0F, 1.0F);
    GL11.glEnable(GL11.GL_ALPHA_TEST);
    this.bindEntityTexture(par1EntityWitherSkull);
    this.skeletonHeadModel.render(par1EntityWitherSkull, 0.0F, 0.0F, 0.0F, var10, var11, var12);
    GL11.glPopMatrix();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:22,代码来源:RenderWitherSkull.java

示例8: setThrowableHeading

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
public void setThrowableHeading(EntityWitherSkull skull, double par1, double par3, double par5, float par7, float par8)
{
    float f2 = MathHelper.sqrt_double(par1 * par1 + par3 * par3 + par5 * par5);
    par1 /= (double)f2;
    par3 /= (double)f2;
    par5 /= (double)f2;
    par1 += rand.nextGaussian() * (double)(rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8;
    par3 += rand.nextGaussian() * (double)(rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8;
    par5 += rand.nextGaussian() * (double)(rand.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double)par8;
    par1 *= (double)par7;
    par3 *= (double)par7;
    par5 *= (double)par7;
    skull.motionX = par1;
    skull.motionY = par3;
    skull.motionZ = par5;
    float f3 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
    skull.prevRotationYaw = skull.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
    skull.prevRotationPitch = skull.rotationPitch = (float)(Math.atan2(par3, (double)f3) * 180.0D / Math.PI);
}
 
开发者ID:jglrxavpok,项目名称:CustomAI,代码行数:20,代码来源:WitherSkullProjectile.java

示例9: func_82209_a

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
private void func_82209_a(int par1, double par2, double par4, double par6, boolean par8) {
	world.playEvent((EntityPlayer)null, 1014, new BlockPos(posX, posY, posZ), 0);
	double d3 = func_82214_u(par1);
	double d4 = func_82208_v(par1);
	double d5 = func_82213_w(par1);
	double d6 = par2 - d3;
	double d7 = par4 - d4;
	double d8 = par6 - d5;
	EntityWitherSkull entitywitherskull = new EntityWitherSkull(world, this, d6, d7, d8);
	if (par8)
		entitywitherskull.setInvulnerable(true);
	entitywitherskull.posY = d4;
	entitywitherskull.posX = d3;
	entitywitherskull.posZ = d5;
	world.spawnEntity(entitywitherskull);
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:17,代码来源:EntityJzahar.java

示例10: func_82209_a

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
private void func_82209_a(int p_82209_1_, double p_82209_2_, double p_82209_4_, double p_82209_6_, boolean p_82209_8_)
{
    this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
    double d3 = this.func_82214_u(p_82209_1_);
    double d4 = this.func_82208_v(p_82209_1_);
    double d5 = this.func_82213_w(p_82209_1_);
    double d6 = p_82209_2_ - d3;
    double d7 = p_82209_4_ - d4;
    double d8 = p_82209_6_ - d5;
    EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.worldObj, this, d6, d7, d8);

    if (p_82209_8_)
    {
        entitywitherskull.setInvulnerable(true);
    }

    entitywitherskull.posY = d4;
    entitywitherskull.posX = d3;
    entitywitherskull.posZ = d5;
    this.worldObj.spawnEntityInWorld(entitywitherskull);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:22,代码来源:EntityWither.java

示例11: func_82209_a

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
private void func_82209_a(int p_82209_1_, double p_82209_2_, double p_82209_4_, double p_82209_6_, boolean p_82209_8_) {
   this.field_70170_p.func_72889_a((EntityPlayer)null, 1014, (int)this.field_70165_t, (int)this.field_70163_u, (int)this.field_70161_v, 0);
   double var9 = this.func_82214_u(p_82209_1_);
   double var11 = this.func_82208_v(p_82209_1_);
   double var13 = this.func_82213_w(p_82209_1_);
   double var15 = p_82209_2_ - var9;
   double var17 = p_82209_4_ - var11;
   double var19 = p_82209_6_ - var13;
   EntityWitherSkull var21 = new EntityWitherSkull(this.field_70170_p, this, var15, var17, var19);
   if(p_82209_8_) {
      var21.func_82343_e(true);
   }

   var21.field_70163_u = var11;
   var21.field_70165_t = var9;
   var21.field_70161_v = var13;
   this.field_70170_p.func_72838_d(var21);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:EntityWither.java

示例12: func_82209_a

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
private void func_82209_a(int par1, double par2, double par4, double par6, boolean par8)
{
    this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1014, (int)this.posX, (int)this.posY, (int)this.posZ, 0);
    double d3 = this.func_82214_u(par1);
    double d4 = this.func_82208_v(par1);
    double d5 = this.func_82213_w(par1);
    double d6 = par2 - d3;
    double d7 = par4 - d4;
    double d8 = par6 - d5;
    EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.worldObj, this, d6, d7, d8);

    if (par8)
    {
        entitywitherskull.setInvulnerable(true);
    }

    entitywitherskull.posY = d4;
    entitywitherskull.posX = d3;
    entitywitherskull.posZ = d5;
    this.worldObj.spawnEntityInWorld(entitywitherskull);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:22,代码来源:EntityWither.java

示例13: entityUndeadCheck

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的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;
}
 
开发者ID:TheTemportalist,项目名称:CountryGamer_PlantsVsZombies,代码行数:17,代码来源:EntDec.java

示例14: doRender

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
/**
 * Renders the desired {@code T} type Entity.
 */
public void doRender(EntityWitherSkull entity, double x, double y, double z, float entityYaw, float partialTicks)
{
    GlStateManager.pushMatrix();
    GlStateManager.disableCull();
    float f = this.getRenderYaw(entity.prevRotationYaw, entity.rotationYaw, partialTicks);
    float f1 = entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks;
    GlStateManager.translate((float)x, (float)y, (float)z);
    float f2 = 0.0625F;
    GlStateManager.enableRescaleNormal();
    GlStateManager.scale(-1.0F, -1.0F, 1.0F);
    GlStateManager.enableAlpha();
    this.bindEntityTexture(entity);

    if (this.renderOutlines)
    {
        GlStateManager.enableColorMaterial();
        GlStateManager.enableOutlineMode(this.getTeamColor(entity));
    }

    this.skeletonHeadModel.render(entity, 0.0F, 0.0F, 0.0F, f, f1, 0.0625F);

    if (this.renderOutlines)
    {
        GlStateManager.disableOutlineMode();
        GlStateManager.disableColorMaterial();
    }

    GlStateManager.popMatrix();
    super.doRender(entity, x, y, z, entityYaw, partialTicks);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:RenderWitherSkull.java

示例15: redirect

import net.minecraft.entity.projectile.EntityWitherSkull; //导入依赖的package包/类
public void redirect(EntityFireball entity) {

        if (!entity.worldObj.isRemote && !(entity instanceof EntityWitherSkull)) {
            AxisAlignedBB axisAlignedBB = new AxisAlignedBB(entity.posX - 100, entity.posY - 100, entity.posZ - 100, entity.posX + 100, entity.posY + 100, entity.posZ + 100);


            List<EntityFireball> targets = ImmutableList.copyOf(Iterables.filter(entity.worldObj.getEntitiesWithinAABB(EntityFireball.class, axisAlignedBB), new Predicate<EntityFireball>() {
                @Override
                public boolean apply(EntityFireball input) {
                    return input.shootingEntity instanceof EntityBlaze || input.shootingEntity instanceof EntityGhast;
                }
            }));

            if (targets.size() > 0) {

                //Check to make sure the fireball is traveling towards the player
                Entity target = targets.get(0);
                entity.motionX = (target.posX - entity.posX) / 15;
                entity.motionY = (target.posY - entity.posY) / 15;
                entity.motionZ = (target.posZ - entity.posZ) / 15;
                entity.accelerationX = entity.motionX * .3;
                entity.accelerationY = entity.motionY * .3;
                entity.accelerationZ = entity.motionZ * .3;
                AuraCascade.proxy.networkWrapper.sendToAllAround(new PacketBurst(1, entity.posX, entity.posY, entity.posZ), new NetworkRegistry.TargetPoint(entity.worldObj.provider.getDimension(), entity.posX, entity.posY, entity.posZ, 32));
            }
        }
    }
 
开发者ID:AdlyTempleton,项目名称:Aura-Cascade,代码行数:28,代码来源:ItemMirror.java


注:本文中的net.minecraft.entity.projectile.EntityWitherSkull类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。