Java 类net.minecraft.block.Block.SoundType 实例源码

项目:ShadowsOfPhysis    文件:DigSiteLocale.java   
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;
}
项目:carpentersblocks    文件:BlockProperties.java   
/**
 * 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);

    }
}
项目:BIGB    文件:AutoItemAndBlock.java   
/**
 * 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;
}
项目:vintagecraft    文件:CoatingClass.java   
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;
}
项目:vintagecraft    文件:TreeClass.java   
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;
}
项目:vintagecraft    文件:RockClass.java   
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;
}
项目:TheStuffMod    文件:UtilityCheck.java   
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;
}
项目:Minecraft-Forge-Class-Template    文件:RegBlock.java   
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;
}
项目:vintagecraft    文件:SoilRockClass.java   
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);
}
项目:Elite-Armageddon    文件:EAToolkit.java   
/**
 * 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;
}
项目:Yamcl    文件:IExtendedBlockProperties.java   
/**
 * The sound this block will make if any entity walks over it
 * 
 * @return
 */
public SoundType getStepSound();
项目:TheStuffMod    文件:BlockBasic.java   
/**
 * 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);
}
项目:vintagecraft    文件:OreInRockClass.java   
SoundType getStepSound() { return Block.soundTypeStone; }
项目:vintagecraft    文件:CoatingClass.java   
SoundType getStepSound() { return stepsound; }
项目:vintagecraft    文件:TreeClass.java   
SoundType getStepSound() { return stepsound; }
项目:vintagecraft    文件:CropClass.java   
SoundType getStepSound() { return Block.soundTypeGrass; }
项目:vintagecraft    文件:RockClass.java   
SoundType getStepSound() { return stepsound; }
项目:vintagecraft    文件:FlowerClass.java   
SoundType getStepSound() { return Block.soundTypeGrass; }
项目:vintagecraft    文件:BaseBlockClass.java   
abstract SoundType getStepSound();
项目:TinyModularThings    文件:IMultiSignItem.java   
public SoundType getSound(ItemStack signItem);