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; }
/** * 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); } }
/** * 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; }
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; }
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; }
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; }
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; }
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; }
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); }
/** * 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; }
/** * The sound this block will make if any entity walks over it * * @return */ public SoundType getStepSound();
/** * 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); }
SoundType getStepSound() { return Block.soundTypeStone; }
SoundType getStepSound() { return stepsound; }
SoundType getStepSound() { return Block.soundTypeGrass; }
abstract SoundType getStepSound();
public SoundType getSound(ItemStack signItem);