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


Java SoundType类代码示例

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


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

示例1: DigSiteLocale

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public DigSiteLocale(String name, String base, String maskname, Material mat, SoundType sound, String shapename1, String shapename2, String shapename3, int colour1, int colour2, int colour3) {
	this.name = name;
	this.base = base;
	this.maskname = maskname;
	
	this.material = mat;
	this.sounds = sound;
	
	this.shapename1 = shapename1;
	this.shapename2 = shapename2;
	this.shapename3 = shapename3;
	
	this.icons = new HashMap<String,IIcon[]>();
	int[] c = {colour1, colour2, colour3};
	this.colours = c;
}
 
开发者ID:TTFTCUTS,项目名称:ShadowsOfPhysis,代码行数:17,代码来源:DigSiteLocale.java

示例2: playBlockSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
/**
 * Plays block sound.
 * Reduced volume is for damaging a block, versus full volume for placement or destruction.
 */
public static void playBlockSound(World world, ItemStack itemStack, int x, int y, int z, boolean reducedVolume)
{
    if (itemStack != null) {

        Block block;

        if (itemStack.getItem() instanceof ItemBlock) {
            block = toBlock(itemStack);
        } else {
            block = Blocks.sand;
        }

        SoundType soundType = block.stepSound;
        float volume = (soundType.getVolume() + 1.0F) / (reducedVolume ? 8.0F : 2.0F);
        float pitch = soundType.getPitch() * 0.8F;

        world.playSoundEffect(x + 0.5F, y + 0.5F, z + 0.5F, soundType.func_150496_b(), volume, pitch);

    }
}
 
开发者ID:Mineshopper,项目名称:carpentersblocks,代码行数:25,代码来源:BlockProperties.java

示例3: CreateOre

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
/**
 * Creates a ore from the specs provided.
 */
public static Block CreateOre(Material material, boolean isOpaqueCube, float Hardness, float Resistence, int LightOpacity, String HarvestTool, int HarvestLevel, SoundType StepSound, String BlockName, CreativeTabs CreativeTab, int LightValue, boolean NeedsRandomTick, boolean UseNeighborBrightness, String TextureName)
{
	Block ore;
	ore = new AutoBlock(material, UseNeighborBrightness, Resistence, Resistence, LightValue, TextureName, LightValue, StepSound, TextureName, CreativeTab, LightValue, UseNeighborBrightness, UseNeighborBrightness, TextureName);
	return ore;
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:10,代码来源:AutoItemAndBlock.java

示例4: CoatingClass

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public CoatingClass(String name, Class<? extends Block> blockclass, Class<? extends ItemBlock> itemclass, float hardness, SoundType stepsound, String harvesLevelTool, int harvestLevel) {
	this.name = name;
	this.blockclass = blockclass;
	this.itemclass = itemclass;
	this.hardness = hardness;
	this.stepsound = stepsound;
	this.harvesttool = harvesLevelTool;
	this.harvestlevel = harvestLevel;
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:10,代码来源:CoatingClass.java

示例5: TreeClass

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public TreeClass(String name, Class<? extends Block> blockclass, Class<? extends ItemBlock> itemclass, float hardness, SoundType stepsound, String harvesLevelTool, int harvestLevel) {
	this.name = name;
	this.blockclass = blockclass;
	this.itemclass = itemclass;
	this.hardness = hardness;
	this.stepsound = stepsound;
	this.harvesttool = harvesLevelTool;
	this.harvestlevel = harvestLevel;
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:10,代码来源:TreeClass.java

示例6: RockClass

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public RockClass(String name, Class<? extends Block> blockclass, Class<? extends ItemBlock> itemclass, float hardness, SoundType stepsound, String harvesLevelTool, int harvestLevel) {
	this.name = name;
	this.blockclass = blockclass;
	this.itemclass = itemclass;
	this.hardness = hardness;
	this.stepsound = stepsound;
	this.harvesttool = harvesLevelTool;
	this.harvestlevel = harvestLevel;
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:10,代码来源:RockClass.java

示例7: getSoundFromMaterial

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public static SoundType getSoundFromMaterial(Material material) {
	if(material == Material.rock) {
		return Block.soundTypeStone;
	} else if(material == Material.iron) {
		return Block.soundTypeMetal;
	} else if(material == Material.leaves || material == Material.grass || material == Material.plants) {
		return Block.soundTypeGrass;
	} else if(material == Material.wood) {
		return Block.soundTypeWood;
	}
	return Block.soundTypeStone;
}
 
开发者ID:OmgImAlexis,项目名称:TheStuffMod,代码行数:13,代码来源:UtilityCheck.java

示例8: setStepSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public RegBlock setStepSound(String Sound)
{
	SoundType soundType = null;
	
	switch(Sound)
	{
	case "Anvil":
		soundType = Block.soundTypeAnvil;
	case "Cloth":
		soundType = Block.soundTypeCloth;
	case "Glass":
		soundType = Block.soundTypeGlass;
	case "Grass":
		soundType = Block.soundTypeGrass;
	case "Gravel":
		soundType = Block.soundTypeGravel;
	case "Ladder":
		soundType = Block.soundTypeLadder;
	case "Metal":
		soundType = Block.soundTypeMetal;
	case "Piston":
		soundType = Block.soundTypePiston;
	case "Sand":
		soundType = Block.soundTypeSand;
	case "Snow":
		soundType = Block.soundTypeSnow;
	case "Stone":
		soundType = Block.soundTypeStone;
	case "Wood":
		soundType = Block.soundTypeWood;
	}
	
	theBlock.setStepSound(soundType);
	
	return this;
}
 
开发者ID:manageryzy,项目名称:Minecraft-Forge-Class-Template,代码行数:37,代码来源:RegBlock.java

示例9: SoilRockClass

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
public SoilRockClass(String name, Class<? extends Block> blockclass, Class<? extends ItemBlock> itemclass, float hardness, SoundType stepsound, String harvesLevelTool, int harvestLevel) {
	super(name, blockclass, itemclass, hardness, stepsound, harvesLevelTool, harvestLevel);
}
 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:4,代码来源:SoilRockClass.java

示例10: registerNewBlock

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
/**
 * Registers new Content Block. Do not use.
 * 
 * @deprecated Not Fully Implemented
 * @param blockMaterial Material of Block
 * @param blockName Unlocalized Name of Block
 * @param stepSound Blocks step sound
 * @return instance of the block
 */
public static EABlock registerNewBlock(Material blockMaterial, String blockName, SoundType stepSound)
{
	EABlock blockInstance = new EABlock(blockMaterial, blockName, stepSound);
	GameRegistry.registerBlock(blockInstance, blockName);
	return blockInstance;
}
 
开发者ID:Cephrus,项目名称:Elite-Armageddon,代码行数:16,代码来源:EAToolkit.java

示例11: getStepSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
/**
 * The sound this block will make if any entity walks over it
 * 
 * @return
 */
public SoundType getStepSound();
 
开发者ID:GTNewHorizons,项目名称:Yamcl,代码行数:7,代码来源:IExtendedBlockProperties.java

示例12: BlockBasic

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
/**
 * Define a new Basic Block.
 * @param name
 * @param material
 * @param tab
 * @param harvest
 * @param hard
 * @param sounds
 */
public BlockBasic(String name, Material material, CreativeTabs tab, int harvest, int hard, SoundType sound) {
	this(name, material, tab, harvest, hard);
	this.setStepSound(sound);
}
 
开发者ID:OmgImAlexis,项目名称:TheStuffMod,代码行数:14,代码来源:BlockBasic.java

示例13: getStepSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
SoundType getStepSound() { return Block.soundTypeStone; } 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:2,代码来源:OreInRockClass.java

示例14: getStepSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
SoundType getStepSound() { return stepsound; } 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:2,代码来源:CoatingClass.java

示例15: getStepSound

import net.minecraft.block.Block.SoundType; //导入依赖的package包/类
SoundType getStepSound() { return Block.soundTypeGrass; } 
开发者ID:tyronx,项目名称:vintagecraft,代码行数:2,代码来源:CropClass.java


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