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


Java EntityDiggingFX类代码示例

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


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

示例1: addDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
{
    int max = 4;

    for (int xOffset = 0; xOffset < max; ++xOffset)
    {
        for (int yOffset = 0; yOffset < max; ++yOffset)
        {
            for (int zOffset = 0; zOffset < max; ++zOffset)
            {
                double pX = (double) x + ((double) xOffset + 0.5D) / (double) max;
                double pY = (double) y + ((double) yOffset + 0.5D) / (double) max;
                double pZ = (double) z + ((double) zOffset + 0.5D) / (double) max;
                Minecraft.getMinecraft().effectRenderer.addEffect((new EntityDiggingFX(world, pX, pY, pZ, pX - (double) x - 0.5D, pY - (double) y - 0.5D, pZ - (double) z
                        - 0.5D, ((TileIllumination) world.getTileEntity(x, y, z)).camoBlock, meta)).applyColourMultiplier(x, y, z));
            }
        }
    }

    return true;
}
 
开发者ID:MikeLydeamore,项目名称:IlluminatedBows,代码行数:24,代码来源:BlockIlluminatedBlock.java

示例2: func_78871_a

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public void func_78871_a(int p_78871_1_, int p_78871_2_, int p_78871_3_, int p_78871_4_, int p_78871_5_) {
   if(p_78871_4_ != 0) {
      Block var6 = Block.field_71973_m[p_78871_4_];
      byte var7 = 4;

      for(int var8 = 0; var8 < var7; ++var8) {
         for(int var9 = 0; var9 < var7; ++var9) {
            for(int var10 = 0; var10 < var7; ++var10) {
               double var11 = (double)p_78871_1_ + ((double)var8 + 0.5D) / (double)var7;
               double var13 = (double)p_78871_2_ + ((double)var9 + 0.5D) / (double)var7;
               double var15 = (double)p_78871_3_ + ((double)var10 + 0.5D) / (double)var7;
               this.func_78873_a((new EntityDiggingFX(this.field_78878_a, var11, var13, var15, var11 - (double)p_78871_1_ - 0.5D, var13 - (double)p_78871_2_ - 0.5D, var15 - (double)p_78871_3_ - 0.5D, var6, p_78871_5_)).func_70596_a(p_78871_1_, p_78871_2_, p_78871_3_));
            }
         }
      }

   }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:19,代码来源:EffectRenderer.java

示例3: spawnSculptEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static void spawnSculptEffect(int x, int y, int z, Block block, byte meta) {
	if(block==null) return;
	
	World world = Minecraft.getMinecraft().theWorld;
	for (int side = 0; side < 6; side++) {
		for (int j = 0; j < 32; j++) {
			EntityDiggingFX fx = addBlockHitEffects(Minecraft.getMinecraft().theWorld, x, y, z, block, meta, side);
			if(fx==null) return;
			
			fx.multipleParticleScaleBy(0.25f + 0.5f * rand.nextFloat());
			fx.multiplyVelocity(0.3f * rand.nextFloat());
		}
	}

	Minecraft.getMinecraft().theWorld.playSound(x + 0.5, y + 0.5, z + 0.5, block.stepSound.getBreakSound(), 1.0f, 0.6f + 0.4f * rand.nextFloat(), true);
}
 
开发者ID:asiekierka,项目名称:Statues,代码行数:17,代码来源:GeneralStatueClient.java

示例4: addDestroyEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
/**
 * Produces block destruction particles at coordinates.
 */
public static void addDestroyEffect(World world, int x, int y, int z, ItemStack itemStack, EffectRenderer effectRenderer)
{
    BlockProperties.prepareItemStackForRendering(itemStack);
    byte factor = 4;

    for (int posX = 0; posX < factor; ++posX)
    {
        for (int posY = 0; posY < factor; ++posY)
        {
            for (int posZ = 0; posZ < factor; ++posZ)
            {
                double dirX = x + (posX + 0.5D) / factor;
                double dirY = y + (posY + 0.5D) / factor;
                double dirZ = z + (posZ + 0.5D) / factor;

                EntityDiggingFX particle = new EntityDiggingFX(world, dirX, dirY, dirZ, dirX - x - 0.5D, dirY - y - 0.5D, dirZ - z - 0.5D, BlockProperties.toBlock(itemStack), itemStack.getItemDamage());
                effectRenderer.addEffect(particle.applyColourMultiplier(x, y, z));
            }
        }
    }
}
 
开发者ID:Mineshopper,项目名称:carpentersblocks,代码行数:25,代码来源:ParticleHelper.java

示例5: addHitEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public boolean addHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer)
{
    int side    = target.sideHit;
    int x       = target.blockX;
    int y       = target.blockY;
    int z       = target.blockZ;
    
    if (getMaterial() != Material.air)
    {
        float offset = 0.1F;
        double pX = (double)x + world.rand.nextDouble() * (getBlockBoundsMaxX() - getBlockBoundsMinX() - (double)(offset * 2.0F)) + (double)offset + getBlockBoundsMinX();
        double pY = (double)y + world.rand.nextDouble() * (getBlockBoundsMaxY() - getBlockBoundsMinY() - (double)(offset * 2.0F)) + (double)offset + getBlockBoundsMinY();
        double pZ = (double)z + world.rand.nextDouble() * (getBlockBoundsMaxZ() - getBlockBoundsMinZ() - (double)(offset * 2.0F)) + (double)offset + getBlockBoundsMinZ();

        ForgeDirection dir = ForgeDirection.getOrientation(side);
        
        pX = dir.offsetX == 0 ? pX : x + Math.max(0, dir.offsetX) + (offset * dir.offsetX);
        pY = dir.offsetY == 0 ? pY : y + Math.max(0, dir.offsetY) + (offset * dir.offsetY);
        pZ = dir.offsetZ == 0 ? pZ : z + Math.max(0, dir.offsetZ) + (offset * dir.offsetZ);

        effectRenderer.addEffect((new EntityDiggingFX(world, pX, pY, pZ, 0.0D, 0.0D, 0.0D, ((TileIllumination)world.getTileEntity(x, y, z)).camoBlock, world.getBlockMetadata(x, y, z)).applyColourMultiplier(x, y, z).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F)));
    }
    
    return true;
}
 
开发者ID:MikeLydeamore,项目名称:IlluminatedBows,代码行数:28,代码来源:BlockIlluminatedBlock.java

示例6: spawnChiselEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static void spawnChiselEffect(int x, int y, int z, String sound) {
	World world = Minecraft.getMinecraft().theWorld;
	for (int side = 0; side < 6; side++) {
		for (int j = 0; j < 16; j++) {
			EntityDiggingFX fx = addBlockHitEffects(Minecraft.getMinecraft().theWorld, x, y, z, side);
			if(fx==null) return;
			
			fx.multipleParticleScaleBy(0.25f + 0.5f * rand.nextFloat());
			fx.multiplyVelocity(0.3f * rand.nextFloat());
		}
	}

	GeneralClient.playChiselSound(world, x, y, z, sound);
}
 
开发者ID:asiekierka,项目名称:Chisel-1.7.2,代码行数:15,代码来源:GeneralChiselClient.java

示例7: spawnChiselEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static void spawnChiselEffect(int x, int y, int z, String sound) {
    World world = Minecraft.getMinecraft().theWorld;
    for (int side = 0; side < 6; side++) {
        for (int j = 0; j < 16; j++) {
            EntityDiggingFX fx = addBlockHitEffects(Minecraft.getMinecraft().theWorld, x, y, z, side);
            if (fx == null) return;

            fx.multipleParticleScaleBy(0.25f + 0.5f * rand.nextFloat());
            fx.multiplyVelocity(0.3f * rand.nextFloat());
        }
    }

    GeneralClient.playChiselSound(world, x, y, z, sound);
}
 
开发者ID:delta534,项目名称:Chisel,代码行数:15,代码来源:GeneralChiselClient.java

示例8: addDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public boolean addDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer)
{
    if(world.getBlockMetadata(x, y, z) == 2 || world.getBlockMetadata(x, y, z) == 10)
    {
        TileEntity te = world.getTileEntity(x, y, z);
        if(te instanceof IAdaptableTile)
        {
            IAdaptableTile tileAdaptable = (IAdaptableTile)te;
            if(tileAdaptable.getBlockForTexture() != null)
            {
                byte b0 = 4;

                for(int i1 = 0; i1 < b0; ++i1)
                {
                    for(int j1 = 0; j1 < b0; ++j1)
                    {
                        for(int k1 = 0; k1 < b0; ++k1)
                        {
                            double d0 = (double)x + ((double)i1 + 0.5D) / (double)b0;
                            double d1 = (double)y + ((double)j1 + 0.5D) / (double)b0;
                            double d2 = (double)z + ((double)k1 + 0.5D) / (double)b0;
                            effectRenderer.addEffect((new EntityDiggingFX(world, d0, d1, d2, d0 - (double)x - 0.5D, d1 - (double)y - 0.5D, d2 - (double)z - 0.5D, tileAdaptable.getBlockForTexture(), tileAdaptable.getBlockMetadataForTexture())).applyColourMultiplier(x, y, z));
                        }
                    }
                }
                return true;
            }
        }
    }
    return super.addDestroyEffects(world, x, y, z, meta, effectRenderer);
}
 
开发者ID:FFMT,项目名称:Privatizer,代码行数:33,代码来源:BlockPrivate.java

示例9: spawnChiselEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static void spawnChiselEffect(int x, int y, int z, String sound) {
	World world = Minecraft.getMinecraft().theWorld;
	for (int side = 0; side < 6; side++) {
		for (int j = 0; j < 16; j++) {
			EntityDiggingFX fx = addBlockHitEffects(Minecraft.getMinecraft().theWorld, x, y, z, side);
			if (fx == null)
				return;

			fx.multipleParticleScaleBy(0.25f + 0.5f * rand.nextFloat());
			fx.multiplyVelocity(0.3f * rand.nextFloat());
		}
	}

	GeneralClient.playChiselSound(world, x, y, z, sound);
}
 
开发者ID:Chisel-2,项目名称:Chisel-2,代码行数:16,代码来源:GeneralChiselClient.java

示例10: spawnAutoChiselFX

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static void spawnAutoChiselFX(TileEntityAutoChisel te, ItemStack base) {
	if (base != null && Minecraft.getMinecraft().gameSettings.particleSetting == 0) {
		for (int i = 0; i < 10; i++) {
			EntityDiggingFX particle = new EntityDiggingFX(te.getWorldObj(), te.xCoord + 0.5, te.yCoord + 0.95, te.zCoord + 0.5, 0, 0, 0, Block.getBlockFromItem(base.getItem()),
					base.getItemDamage());
			particle.setVelocity((te.getWorldObj().rand.nextDouble() / 4) - 0.125, te.getWorldObj().rand.nextDouble() / 8, (te.getWorldObj().rand.nextDouble() / 4) - 0.125);
			Minecraft.getMinecraft().effectRenderer.addEffect(particle);
		}
		String sound = Carving.chisel.getVariationSound(base.getItem(), base.getItemDamage());
		GeneralClient.playChiselSound(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, sound);
	}
}
 
开发者ID:Chisel-2,项目名称:Chisel-2,代码行数:13,代码来源:GeneralChiselClient.java

示例11: addBlockDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer, Block block, int metadata, int side) {
	byte size = 4;
	for(int i = 0; i < size; i++) {
		for(int j = 0; j < size; j++) {
			for(int k = 0; k < size; k++) {
				double xx = (double) x + ((double) i + 0.5D) / (double) size;
				double yy = (double) y + ((double) j + 0.5D) / (double) size;
				double zz = (double) z + ((double) k + 0.5D) / (double) size;
				effectRenderer.addEffect((new EntityDiggingFX(world, xx, yy, zz, xx - (double) x - 0.5D, yy - (double) y - 0.5D, zz - (double) z - 0.5D, block, metadata, side)).applyColourMultiplier(x, y, z));
			}
		}
	}
	return true;
}
 
开发者ID:ElConquistador,项目名称:ElConQore,代码行数:16,代码来源:EQUtilClient.java

示例12: addBlockHitEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
public static boolean addBlockHitEffects(World world, MovingObjectPosition target, EffectRenderer effectRenderer, int metadata, int side) {
	int x = target.blockX;
	int y = target.blockY;
	int z = target.blockZ;
	int sideHit = target.sideHit;
	Block block = world.getBlock(x, y, z);

	float f = 0.1F;
	double xx = (double) x + world.rand.nextDouble() * (block.getBlockBoundsMaxX() - block.getBlockBoundsMinX() - (double) (f * 2.0F)) + (double) f + block.getBlockBoundsMinX();
	double yy = (double) y + world.rand.nextDouble() * (block.getBlockBoundsMaxY() - block.getBlockBoundsMinY() - (double) (f * 2.0F)) + (double) f + block.getBlockBoundsMinY();
	double zz = (double) z + world.rand.nextDouble() * (block.getBlockBoundsMaxZ() - block.getBlockBoundsMinZ() - (double) (f * 2.0F)) + (double) f + block.getBlockBoundsMinZ();
	if(sideHit == 0) {
		yy = (double) y + block.getBlockBoundsMinY() - (double) f;
	}
	if(sideHit == 1) {
		yy = (double) y + block.getBlockBoundsMaxY() + (double) f;
	}
	if(sideHit == 2) {
		zz = (double) z + block.getBlockBoundsMinZ() - (double) f;
	}
	if(sideHit == 3) {
		zz = (double) z + block.getBlockBoundsMaxZ() + (double) f;
	}
	if(sideHit == 4) {
		xx = (double) x + block.getBlockBoundsMinX() - (double) f;
	}
	if(sideHit == 5) {
		xx = (double) x + block.getBlockBoundsMaxX() + (double) f;
	}
	effectRenderer.addEffect((new EntityDiggingFX(world, xx, yy, zz, 0.0D, 0.0D, 0.0D, block, metadata, side)).applyColourMultiplier(x, y, z).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F));
	return true;
}
 
开发者ID:ElConquistador,项目名称:ElConQore,代码行数:34,代码来源:EQUtilClient.java

示例13: addDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@Override
public boolean addDestroyEffects (World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
    TileEntityWoodProxy te = getTileEntity(world, x, y, z);
    BlockThinLog block = getBlock(world, x, y, z);

    if (te == null || block == null)
        return false;

    int protoMeta = te.getProtoMeta();
    Block protoBlock = te.getProtoBlock();
    if (protoBlock == null) {
        protoBlock = Blocks.log;
        protoMeta = world.getBlockMetadata(x, y, z);
    }

    try {
        byte count = 4;
        for (int ix = 0; ix < count; ++ix) {
            for (int iy = 0; iy < count; ++iy) {
                for (int iz = 0; iz < count; ++iz) {
                    double xOff = (double)x + ((double)ix + 0.5D) / (double)count;
                    double yOff = (double)y + ((double)iy + 0.5D) / (double)count;
                    double zOff = (double)z + ((double)iz + 0.5D) / (double)count;

                    EntityDiggingFX fx = new EntityDiggingFX(world, xOff, yOff, zOff, xOff - (double) x - 0.5D, yOff - (double) y - 0.5D, zOff - (double) z - 0.5D, this, meta);
                    fx.setParticleIcon(block.getIcon(world.rand.nextInt(6), te.composeMetadata(protoBlock, protoMeta)));

                    effectRenderer.addEffect(fx.applyColourMultiplier(x, y, z));
                }
            }
        }
    }
    catch (Exception e) { }

    return true;
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:38,代码来源:BlockThinLog.java

示例14: addDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@Override
public boolean addDestroyEffects (World world, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
    TileEntityWoodProxy te = getTileEntity(world, x, y, z);
    BlockThinLogFence block = getBlock(world, x, y, z);

    if (te == null || block == null)
        return false;

    int protoMeta = te.getProtoMeta();
    Block protoBlock = te.getProtoBlock();
    if (protoBlock == null) {
        protoBlock = Blocks.log;
        protoMeta = world.getBlockMetadata(x, y, z);
    }

    try {
        byte count = 4;
        for (int ix = 0; ix < count; ++ix) {
            for (int iy = 0; iy < count; ++iy) {
                for (int iz = 0; iz < count; ++iz) {
                    double xOff = (double)x + ((double)ix + 0.5D) / (double)count;
                    double yOff = (double)y + ((double)iy + 0.5D) / (double)count;
                    double zOff = (double)z + ((double)iz + 0.5D) / (double)count;

                    EntityDiggingFX fx = new EntityDiggingFX(world, xOff, yOff, zOff, xOff - (double) x - 0.5D, yOff - (double) y - 0.5D, zOff - (double) z - 0.5D, this, meta);
                    fx.setParticleIcon(block.getIcon(world.rand.nextInt(6), te.composeMetadata(protoBlock, protoMeta)));

                    effectRenderer.addEffect(fx.applyColourMultiplier(x, y, z));
                }
            }
        }
    }
    catch (Exception e) { }

    return true;
}
 
开发者ID:jaquadro,项目名称:GardenCollection,代码行数:38,代码来源:BlockThinLogFence.java

示例15: addBlockDestroyEffects

import net.minecraft.client.particle.EntityDiggingFX; //导入依赖的package包/类
public static boolean addBlockDestroyEffects(World world, int x, int y, int z, int meta, EffectRenderer effectRenderer, Block block, int metadata) {
	byte size = 4;
	for(int i = 0; i < size; i++) {
		for(int j = 0; j < size; j++) {
			for(int k = 0; k < size; k++) {
				double xx = (double) x + ((double) i + 0.5D) / (double) size;
				double yy = (double) y + ((double) j + 0.5D) / (double) size;
				double zz = (double) z + ((double) k + 0.5D) / (double) size;
				effectRenderer.addEffect((new EntityDiggingFX(world, xx, yy, zz, xx - (double) x - 0.5D, yy - (double) y - 0.5D, zz - (double) z - 0.5D, block, metadata)).applyColourMultiplier(x, y, z));
			}
		}
	}
	return true;
}
 
开发者ID:TeamMetallurgy,项目名称:Metallurgy-Bees,代码行数:15,代码来源:MBUtilClient.java


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