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


Java EntityDiggingFX.multiplyVelocity方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: spawnCopyEffect

import net.minecraft.client.particle.EntityDiggingFX; //导入方法依赖的package包/类
public static void spawnCopyEffect(World world, int x, int y, int z, int side, float hx, float hy, float hz, TileEntityStatue statue) {
	world.playSound(x + 0.5, y + 0.5, z + 0.5, "statues:copy", 2.0F, world.rand.nextFloat()*0.4f+0.8f, false);

	for(int i=0;i<8;i++){
		EntityDiggingFX fx = addBlockHitEffects(Minecraft.getMinecraft().theWorld, x, y, z, statue.block, statue.meta, side);
		if(fx==null) return;
		
		fx.setPosition(x+hx, y+hy, z+hz);
		fx.multipleParticleScaleBy(0.15f + 0.7f * rand.nextFloat());
		fx.multiplyVelocity(0.3f * rand.nextFloat());		
	}
}
 
开发者ID:asiekierka,项目名称:Statues,代码行数:13,代码来源:GeneralStatueClient.java


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