block sounds

This commit is contained in:
Sen 2025-03-18 12:54:37 +01:00
parent c602585e6a
commit 47b9ecbb94
14 changed files with 123 additions and 193 deletions

View file

@ -2,116 +2,46 @@ package game.audio;
import game.init.SoundEvent;
public class SoundType
{
public static final SoundType SLIME = new SoundType(SoundEvent.SLIME_BIG, SoundEvent.SLIME_SMALL, 1.0F);
// {
// public Sounds getBreakSound()
// {
// return "mob.slime.big";
// }
// public Sounds getPlaceSound()
// {
// return "mob.slime.big";
// }
// public Sounds getStepSound()
// {
// return "mob.slime.small";
// }
// };
public static final SoundType ANVIL = new SoundType(SoundEvent.STONE, SoundEvent.ANVIL_LAND, SoundEvent.STONE, 0.3F);
// {
// public Sounds getBreakSound()
// {
// return "dig.stone";
// }
// public Sounds getPlaceSound()
// {
// return "random.anvil_land";
// }
// public Sounds getStepSound() // fix ...
// {
// return "dig.stone";
// }
// };
public static final SoundType LADDER = new SoundType(SoundEvent.WOOD, null, 1.0F);
// {
// public Sounds getBreakSound()
// {
// return "dig.wood";
// }
// public Sounds getStepSound()
// {
// return null;
// }
// };
public static final SoundType SNOW = new SoundType(SoundEvent.SNOW, 1.0F);
public static final SoundType SAND = new SoundType(SoundEvent.SAND, 1.0F);
public static final SoundType CLOTH = new SoundType(SoundEvent.CLOTH, 1.0F);
public static final SoundType GLASS = new SoundType(SoundEvent.GLASS, SoundEvent.STONE, SoundEvent.STONE, 1.0F);
// {
// public Sounds getBreakSound()
// {
// return "dig.glass";
// }
// public Sounds getPlaceSound()
// {
// return "dig.stone";
// }
// };
public static final SoundType METAL = new SoundType(SoundEvent.STONE, 1.0F);
public static final SoundType PISTON = new SoundType(SoundEvent.STONE, 1.0F);
public static final SoundType GRASS = new SoundType(SoundEvent.GRASS /* , null */ , 1.0F);
// {
// public Sounds getStepSound()
// {
// return null;
// }
// };
public static final SoundType GRAVEL = new SoundType(SoundEvent.GRAVEL, 1.0F);
public static final SoundType WOOD = new SoundType(SoundEvent.WOOD, 1.0F);
public static final SoundType STONE = new SoundType(SoundEvent.STONE, 1.0F);
public enum SoundType {
STONE(SoundEvent.STONE),
WOOD(SoundEvent.WOOD),
GRAVEL(SoundEvent.GRAVEL),
SAND(SoundEvent.SAND),
GRASS(SoundEvent.GRASS),
SNOW(SoundEvent.SNOW),
CLOTH(SoundEvent.CLOTH),
SLIME(SoundEvent.SLIME_BIG, SoundEvent.SLIME_SMALL),
ANVIL(SoundEvent.STONE, SoundEvent.ANVIL_LAND, SoundEvent.STONE),
LADDER(SoundEvent.WOOD, null),
GLASS(SoundEvent.GLASS, SoundEvent.STONE, SoundEvent.STONE);
private final SoundEvent breakSound;
private final SoundEvent placeSound;
private final SoundEvent stepSound;
private final float volume;
private SoundType(SoundEvent breakSound, SoundEvent placeSound, SoundEvent stepSound, float volume)
{
private SoundType(SoundEvent breakSound, SoundEvent placeSound, SoundEvent stepSound) {
this.breakSound = breakSound;
this.placeSound = placeSound;
this.stepSound = stepSound;
this.volume = volume;
}
private SoundType(SoundEvent breakPlaceSound, SoundEvent stepSound, float volume)
{
this(breakPlaceSound, breakPlaceSound, stepSound, volume);
private SoundType(SoundEvent breakPlaceSound, SoundEvent stepSound) {
this(breakPlaceSound, breakPlaceSound, stepSound);
}
private SoundType(SoundEvent sound, float volume)
{
this(sound, sound, sound, volume);
private SoundType(SoundEvent sound) {
this(sound, sound, sound);
}
public SoundEvent getBreakSound()
{
public SoundEvent getBreakSound() {
return this.breakSound;
}
public SoundEvent getPlaceSound()
{
public SoundEvent getPlaceSound() {
return this.placeSound;
}
public SoundEvent getStepSound()
{
public SoundEvent getStepSound() {
return this.stepSound;
}
public float getVolume()
{
return this.volume;
}
}

View file

@ -255,7 +255,7 @@ public class BlockPistonBase extends Block
super(Material.piston);
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(EXTENDED, Boolean.valueOf(false)));
this.isSticky = isSticky;
this.setStepSound(SoundType.PISTON);
this.setStepSound(SoundType.STONE);
this.setHardness(0.5F);
this.setTab(CheatTab.tabTech);
}

View file

@ -34,7 +34,7 @@ public class BlockPistonHead extends Block
{
super(Material.piston);
this.setDefaultState(this.getBaseState().withProperty(FACING, Facing.NORTH).withProperty(TYPE, BlockPistonHead.EnumPistonType.DEFAULT).withProperty(SHORT, Boolean.valueOf(false)));
this.setStepSound(SoundType.PISTON);
this.setStepSound(SoundType.STONE);
this.setHardness(0.5F);
}

View file

@ -850,11 +850,11 @@ public abstract class Entity
{
block$soundtype = Blocks.snow_layer.sound;
if(block$soundtype.getStepSound() != null)
this.playSound(block$soundtype.getStepSound(), block$soundtype.getVolume() * 0.15F);
this.playSound(block$soundtype.getStepSound(), 0.15F);
}
else if (!blockIn.getMaterial().isLiquid() && block$soundtype.getStepSound() != null)
{
this.playSound(block$soundtype.getStepSound(), block$soundtype.getVolume() * 0.15F);
this.playSound(block$soundtype.getStepSound(), 0.15F);
}
}

View file

@ -440,7 +440,7 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
{
SoundType block$soundtype = block.sound;
if(block$soundtype.getStepSound() != null)
this.worldObj.playSoundAtEntity(this, block$soundtype.getStepSound(), block$soundtype.getVolume() * 0.5F);
this.worldObj.playSoundAtEntity(this, block$soundtype.getStepSound(), 0.5F);
}
}
}
@ -637,25 +637,25 @@ public class EntityHorse extends EntityAnimal implements IInvBasic
if (this.gallopTime > 5 && this.gallopTime % 3 == 0)
{
this.playSound(SoundEvent.HORSE_GALLOP, block$soundtype.getVolume() * 0.15F);
this.playSound(SoundEvent.HORSE_GALLOP, 0.15F);
if (i == 0 && this.rand.chance(10))
{
this.playSound(SoundEvent.HORSE_BREATHE, block$soundtype.getVolume() * 0.6F);
this.playSound(SoundEvent.HORSE_BREATHE, 0.6F);
}
}
else if (this.gallopTime <= 5)
{
this.playSound(SoundEvent.HORSE_WOOD, block$soundtype.getVolume() * 0.15F);
this.playSound(SoundEvent.HORSE_WOOD, 0.15F);
}
}
else if (block$soundtype == SoundType.WOOD)
{
this.playSound(SoundEvent.HORSE_WOOD, block$soundtype.getVolume() * 0.15F);
this.playSound(SoundEvent.HORSE_WOOD, 0.15F);
}
else
{
this.playSound(SoundEvent.HORSE_SOFT, block$soundtype.getVolume() * 0.15F);
this.playSound(SoundEvent.HORSE_SOFT, 0.15F);
}
}
}

View file

@ -1236,7 +1236,7 @@ public abstract class EntityLiving extends Entity
{
SoundType block$soundtype = block.sound;
if(block$soundtype.getStepSound() != null)
this.playSound(block$soundtype.getStepSound(), block$soundtype.getVolume() * 0.5F);
this.playSound(block$soundtype.getStepSound(), 0.5F);
}
}
}

View file

@ -149,34 +149,34 @@ public abstract class BlockRegistry {
}
private static void registerBlocks() {
Block stone = (new BlockStone()).setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Stein");
Block stone = (new BlockStone()).setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Stein");
registerBlock(1, "stone", stone);
registerBlock(2, "bedrock", (new BlockBedrock()).setHardness(1000.0F).setResistance(100000.0F).setStepSound(SoundType.PISTON)
registerBlock(2, "bedrock", (new BlockBedrock()).setHardness(1000.0F).setResistance(100000.0F).setStepSound(SoundType.STONE)
.setDisplay("Grundgestein").setTab(CheatTab.tabNature).setMiningLevel(6));
registerBlock(3, "rock",
(new BlockRock()).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.PISTON).setDisplay("Felsen"));
registerBlock(4, "hellrock", (new BlockHellRock()).setHardness(0.4F).setStepSound(SoundType.PISTON).setDisplay("Höllenstein"));
(new BlockRock()).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.STONE).setDisplay("Felsen"));
registerBlock(4, "hellrock", (new BlockHellRock()).setHardness(0.4F).setStepSound(SoundType.STONE).setDisplay("Höllenstein"));
registerBlock(5, "cell_rock", (new Block(Material.clay)).setHardness(1.0F).setResistance(3.0F)
.setStepSound(SoundType.SLIME).setDisplay("Zellstein").setTab(CheatTab.tabNature));
registerBlock(6, "moon_rock", (new Block(Material.rock)).setHardness(2.5F).setResistance(10.0F)
.setStepSound(SoundType.PISTON).setDisplay("Mondgestein").setTab(CheatTab.tabNature));
Block cobblestone = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON)
.setStepSound(SoundType.STONE).setDisplay("Mondgestein").setTab(CheatTab.tabNature));
Block cobblestone = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Bruchstein").setTab(CheatTab.tabNature);
registerBlock(7, "cobblestone", cobblestone);
registerBlock(8, "mossy_cobblestone", (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON)
registerBlock(8, "mossy_cobblestone", (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Bemooster Bruchstein").setTab(CheatTab.tabNature));
Block sandstone = (new BlockSandStone()).setStepSound(SoundType.PISTON).setHardness(0.8F).setDisplay("Sandstein");
Block sandstone = (new BlockSandStone()).setStepSound(SoundType.STONE).setHardness(0.8F).setDisplay("Sandstein");
registerBlock(9, "sandstone", sandstone);
registerBlock(10, "obsidian", (new BlockObsidian()).setHardness(50.0F).setResistance(2000.0F).setStepSound(SoundType.PISTON)
registerBlock(10, "obsidian", (new BlockObsidian()).setHardness(50.0F).setResistance(2000.0F).setStepSound(SoundType.STONE)
.setDisplay("Obsidian").setMiningLevel(3));
registerBlock(11, "clay",
(new BlockClay()).setHardness(0.6F).setStepSound(SoundType.GRAVEL).setDisplay("Ton").setShovelHarvestable());
registerBlock(12, "hardened_clay",
(new BlockHardenedClay()).setHardness(1.25F).setResistance(7.0F).setStepSound(SoundType.PISTON).setDisplay("Gebrannter Ton"));
(new BlockHardenedClay()).setHardness(1.25F).setResistance(7.0F).setStepSound(SoundType.STONE).setDisplay("Gebrannter Ton"));
registerBlock(13, "stained_hardened_clay", (new BlockColored(Material.rock)).setHardness(1.25F).setResistance(7.0F)
.setStepSound(SoundType.PISTON).setDisplay("gefärbter Ton").setTab(CheatTab.tabNature));
.setStepSound(SoundType.STONE).setDisplay("gefärbter Ton").setTab(CheatTab.tabNature));
registerBlock(14, "coal_block", (new Block(Material.rock)).setHardness(5.0F).setResistance(10.0F)
.setStepSound(SoundType.PISTON).setDisplay("Kohleblock").setTab(CheatTab.tabNature));
.setStepSound(SoundType.STONE).setDisplay("Kohleblock").setTab(CheatTab.tabNature));
registerBlock(15, "sand", (new BlockSand()).setHardness(0.5F).setStepSound(SoundType.SAND).setDisplay("Sand").setShovelHarvestable());
registerBlock(16, "gravel",
(new BlockGravel()).setHardness(0.6F).setStepSound(SoundType.GRAVEL).setDisplay("Kies").setShovelHarvestable());
@ -210,31 +210,31 @@ public abstract class BlockRegistry {
registerBlock(60, "coal_ore",
(new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON).setDisplay("Steinkohle"));
registerBlock(61, "lapis_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
(new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE).setDisplay("Steinkohle"));
registerBlock(61, "lapis_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay("Lapislazulierz").setMiningLevel(1));
registerBlock(62, "emerald_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(62, "emerald_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay("Smaragderz").setMiningLevel(2));
registerBlock(63, "quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(63, "quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay("Quarzerz"));
registerBlock(64, "black_quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(64, "black_quartz_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay("Schwarzes Quarzerz"));
registerBlock(68, "redstone_ore", (new BlockRedstoneOre(false)).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(68, "redstone_ore", (new BlockRedstoneOre(false)).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay("Redstone-Erz").setTab(CheatTab.tabGems).setMiningLevel(2));
registerBlock(69, "lit_redstone_ore", (new BlockRedstoneOre(true)).setLightLevel(0.625F).setHardness(3.0F).setResistance(5.0F)
.setStepSound(SoundType.PISTON).setDisplay("Redstone-Erz").setMiningLevel(2));
.setStepSound(SoundType.STONE).setDisplay("Redstone-Erz").setMiningLevel(2));
int bid = 70;
for(MetalType metal : MetalType.values()) {
// String loc = metal.name.substring(0, 1).toUpperCase() + metal.name.substring(1);
registerBlock(bid++, metal.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(bid++, metal.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay(metal.display + "erz").setMiningLevel(1).setLightLevel(metal.radioactivity > 0.0F ? 0.25F : 0.0F)
.setRadiation(metal.radioactivity * 0.5f));
}
bid = 110;
for(OreType ore : OreType.values()) {
// String loc = ore.name.substring(0, 1).toUpperCase() + ore.name.substring(1);
registerBlock(bid++, ore.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.PISTON)
registerBlock(bid++, ore.name + "_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setStepSound(SoundType.STONE)
.setDisplay(ore.display + "erz").setMiningLevel(ore.material.getHarvestLevel() - 1));
}
@ -247,9 +247,9 @@ public abstract class BlockRegistry {
(new BlockGrass()).setHardness(0.6F).setStepSound(SoundType.GRASS).setDisplay("Gras").setShovelHarvestable());
registerBlock(130, "mycelium",
(new BlockMycelium()).setHardness(0.6F).setStepSound(SoundType.GRASS).setDisplay("Myzel").setShovelHarvestable());
registerBlock(131, "tian", (new Block(Material.rock)).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.PISTON)
registerBlock(131, "tian", (new Block(Material.rock)).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.STONE)
.setDisplay("Tian").setTab(CheatTab.tabNature));
registerBlock(132, "tian_soil", (new BlockTianSoil()).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.PISTON)
registerBlock(132, "tian_soil", (new BlockTianSoil()).setHardness(2.0F).setResistance(15.0F).setStepSound(SoundType.STONE)
.setDisplay("Tianerde").setTab(CheatTab.tabNature));
registerBlock(133, "moon_cheese", (new BlockTreasure(Material.gourd)).setHardness(1.5F).setResistance(5.0F)
.setStepSound(SoundType.CLOTH).setDisplay("Mondkäse").setTab(CheatTab.tabNature));
@ -309,11 +309,11 @@ public abstract class BlockRegistry {
registerBlock(256, "lapis_block", (new Block(Material.iron)).setHardness(3.0F).setResistance(5.0F)
.setStepSound(SoundType.PISTON).setDisplay("Lapislazuliblock").setTab(CheatTab.tabGems).setMiningLevel(1));
.setStepSound(SoundType.STONE).setDisplay("Lapislazuliblock").setTab(CheatTab.tabGems).setMiningLevel(1));
registerBlock(257, "emerald_block", (new Block(Material.iron)).setHardness(5.0F).setResistance(10.0F)
.setStepSound(SoundType.METAL).setDisplay("Smaragdblock").setTab(CheatTab.tabGems).setMiningLevel(2));
.setStepSound(SoundType.STONE).setDisplay("Smaragdblock").setTab(CheatTab.tabGems).setMiningLevel(2));
registerBlock(258, "redstone_block", (new BlockCompressedPowered(Material.iron)).setHardness(5.0F).setResistance(10.0F)
.setStepSound(SoundType.METAL).setDisplay("Redstone-Block").setTab(CheatTab.tabTech));
.setStepSound(SoundType.STONE).setDisplay("Redstone-Block").setTab(CheatTab.tabTech));
registerBlock(270, "glass",
(new BlockGlass(Material.glass, false)).setHardness(0.3F).setStepSound(SoundType.GLASS).setDisplay("Glas"));
@ -343,12 +343,12 @@ public abstract class BlockRegistry {
.setDisplay("Lampe").setTab(CheatTab.tabTech));
registerBlock(304, "bookshelf", (new BlockBookshelf()).setHardness(1.5F).setStepSound(SoundType.WOOD).setDisplay("Bücherregal"));
registerBlock(305, "cake", (new BlockCake()).setHardness(0.5F).setStepSound(SoundType.CLOTH).setDisplay("Kuchen"));
registerBlock(306, "dragon_egg", (new BlockDragonEgg()).setHardness(3.0F).setResistance(15.0F).setStepSound(SoundType.PISTON)
registerBlock(306, "dragon_egg", (new BlockDragonEgg()).setHardness(3.0F).setResistance(15.0F).setStepSound(SoundType.STONE)
.setLightLevel(0.125F).setDisplay("Drachenei").setTab(CheatTab.tabDeco));
registerBlock(307, "flower_pot", (new BlockFlowerPot()).setHardness(0.0F).setStepSound(SoundType.STONE).setDisplay("Blumentopf"));
registerBlock(308, "sponge", (new Block(Material.sponge)).setHardness(0.6F).setStepSound(SoundType.GRASS).setDisplay("Schwamm")
.setTab(CheatTab.tabDeco));
registerBlock(309, "skull", (new BlockSkull()).setHardness(1.0F).setStepSound(SoundType.PISTON).setDisplay("Kopf"));
registerBlock(309, "skull", (new BlockSkull()).setHardness(1.0F).setStepSound(SoundType.STONE).setDisplay("Kopf"));
registerBlock(310, "lit_pumpkin",
(new BlockPumpkin()).setHardness(1.0F).setStepSound(SoundType.WOOD).setLightLevel(1.0F).setDisplay("Kürbislaterne"));
registerBlock(311, "hay_block", (new BlockHay()).setHardness(0.5F).setStepSound(SoundType.GRASS).setDisplay("Strohballen")
@ -382,7 +382,7 @@ public abstract class BlockRegistry {
for(MetalType metal : MetalType.values()) {
// String loc = metal.name.substring(0, 1).toUpperCase() + metal.name.substring(1);
registerBlock(bid++, metal.name + "_block",
(new Block(Material.iron)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.METAL)
(new Block(Material.iron)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay(metal.display + "block").setTab(CheatTab.tabGems).setMiningLevel(1)
.setLightLevel(metal.radioactivity > 0.0F ? 0.25F : 0.0F).setRadiation(metal.radioactivity * 2.0f));
}
@ -390,7 +390,7 @@ public abstract class BlockRegistry {
for(OreType ore : OreType.values()) {
// String loc = ore.name.substring(0, 1).toUpperCase() + ore.name.substring(1);
registerBlock(bid++, ore.name + "_block",
(new Block(Material.iron)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.METAL)
(new Block(Material.iron)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay(ore.display + "block").setTab(CheatTab.tabGems)
.setMiningLevel(ore.material.getHarvestLevel() - 1));
}
@ -402,85 +402,85 @@ public abstract class BlockRegistry {
registerBlock(600, "stone_slab",
(new BlockSlab(Material.rock, "stone_slab_side", "double_stone_top", "double_stone_top"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Steinstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Steinstufe"));
registerBlock(601, "stone_stairs", (new BlockStairs(stone.getState())).setDisplay("Steintreppe"));
registerBlock(610, "cobblestone_slab",
(new BlockSlab(Material.rock, "cobblestone"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Bruchsteinstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Bruchsteinstufe"));
registerBlock(611, "cobblestone_stairs", (new BlockStairs(cobblestone.getState())).setDisplay("Bruchsteintreppe"));
registerBlock(612, "cobblestone_wall", (new BlockWall(cobblestone)).setDisplay("Bruchsteinmauer"));
registerBlock(620, "sandstone_slab",
(new BlockSlab(Material.rock, "sandstone_normal", "sandstone_bottom", "sandstone_all"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Sandsteinstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Sandsteinstufe"));
registerBlock(621, "sandstone_stairs",
(new BlockStairs(sandstone.getState().withProperty(BlockSandStone.TYPE, BlockSandStone.EnumType.DEFAULT),
"sandstone_bottom", "sandstone_all")) // fix type
.setDisplay("Sandsteintreppe"));
Block quartz = (new BlockQuartz("")).setStepSound(SoundType.PISTON).setHardness(0.8F).setDisplay("Quarzblock");
Block quartz = (new BlockQuartz("")).setStepSound(SoundType.STONE).setHardness(0.8F).setDisplay("Quarzblock");
registerBlock(630, "quartz_block", quartz);
registerBlock(631, "quartz_slab",
(new BlockSlab(Material.rock, "quartz_block_side", "quartz_block_bottom", "quartz_top"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Quarzstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Quarzstufe"));
registerBlock(632, "quartz_stairs",
(new BlockStairs(quartz.getState().withProperty(BlockQuartz.VARIANT, BlockQuartz.EnumType.DEFAULT),
"quartz_block_bottom", "quartz_top"))
.setDisplay("Quarztreppe"));
registerBlock(640, "iron_bars", (new BlockPane(Material.iron, true)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.METAL)
registerBlock(640, "iron_bars", (new BlockPane(Material.iron, true)).setHardness(5.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Eisengitter"));
registerBlock(641, "iron_door",
(new BlockDoor(Material.iron)).setHardness(5.0F).setStepSound(SoundType.METAL).setDisplay("Eisentür"));
(new BlockDoor(Material.iron)).setHardness(5.0F).setStepSound(SoundType.STONE).setDisplay("Eisentür"));
registerBlock(642, "iron_trapdoor",
(new BlockTrapDoor(Material.iron)).setHardness(5.0F).setStepSound(SoundType.METAL).setDisplay("Eisenfalltür"));
(new BlockTrapDoor(Material.iron)).setHardness(5.0F).setStepSound(SoundType.STONE).setDisplay("Eisenfalltür"));
Block brick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON)
Block brick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Ziegelsteine").setTab(CheatTab.tabBlocks);
registerBlock(650, "brick_block", brick);
registerBlock(651, "brick_slab",
(new BlockSlab(Material.rock, "brick_block"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Ziegelstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Ziegelstufe"));
registerBlock(652, "brick_stairs", (new BlockStairs(brick.getState())).setDisplay("Ziegeltreppe"));
Block stonebrick = (new BlockStoneBrick()).setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.PISTON)
Block stonebrick = (new BlockStoneBrick()).setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Steinziegel");
registerBlock(660, "stonebrick", stonebrick);
registerBlock(661, "stonebrick_slab",
(new BlockSlab(Material.rock, "stonebrick_default"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Steinziegelstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Steinziegelstufe"));
registerBlock(662, "stonebrick_stairs",
(new BlockStairs(stonebrick.getState().withProperty(BlockStoneBrick.VARIANT, BlockStoneBrick.EnumType.DEFAULT)))
.setDisplay("Steinziegeltreppe"));
Block bloodBrick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON)
Block bloodBrick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Blutrote Ziegel").setTab(CheatTab.tabBlocks);
registerBlock(670, "blood_brick", bloodBrick);
registerBlock(671, "blood_brick_slab",
(new BlockSlab(Material.rock, "blood_brick"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Blutrote Ziegelstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Blutrote Ziegelstufe"));
registerBlock(672, "blood_brick_fence", (new BlockFence(Material.rock, "blood_brick")).setHardness(2.0F).setResistance(10.0F)
.setStepSound(SoundType.PISTON).setDisplay("Blutroter Ziegelzaun"));
.setStepSound(SoundType.STONE).setDisplay("Blutroter Ziegelzaun"));
registerBlock(673, "blood_brick_stairs", (new BlockStairs(bloodBrick.getState())).setDisplay("Blutrote Ziegeltreppe"));
Block blackBrick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON)
Block blackBrick = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Schwarze Ziegel").setTab(CheatTab.tabBlocks);
registerBlock(680, "black_brick", blackBrick);
registerBlock(681, "black_brick_slab",
(new BlockSlab(Material.rock, "black_brick"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Schwarze Ziegelstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Schwarze Ziegelstufe"));
registerBlock(682, "black_brick_stairs", (new BlockStairs(blackBrick.getState())).setDisplay("Schwarze Ziegeltreppe"));
registerBlock(683, "black_brick_fence", (new BlockFence(Material.rock, "black_brick")).setHardness(2.0F).setResistance(10.0F)
.setStepSound(SoundType.PISTON).setDisplay("Schwarzer Ziegelzaun"));
.setStepSound(SoundType.STONE).setDisplay("Schwarzer Ziegelzaun"));
Block bquartz = (new BlockQuartz("black_")).setStepSound(SoundType.PISTON).setHardness(0.8F).setDisplay("Schwarzer Quarzblock");
Block bquartz = (new BlockQuartz("black_")).setStepSound(SoundType.STONE).setHardness(0.8F).setDisplay("Schwarzer Quarzblock");
registerBlock(690, "black_quartz_block", bquartz);
registerBlock(691, "black_quartz_slab",
(new BlockSlab(Material.rock, "black_quartz_block_side", "black_quartz_block_bottom", "black_quartz_top"))
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Schwarze Quarzstufe"));
.setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Schwarze Quarzstufe"));
registerBlock(692, "black_quartz_stairs",
(new BlockStairs(bquartz.getState().withProperty(BlockQuartz.VARIANT, BlockQuartz.EnumType.DEFAULT),
"black_quartz_block_bottom", "black_quartz_top"))
@ -489,7 +489,7 @@ public abstract class BlockRegistry {
bid = 700;
for(DecoType deco : DecoType.values()) {
registerBlock(bid++, deco.name, (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F)
.setStepSound(SoundType.PISTON).setDisplay(deco.display).setTab(CheatTab.tabBlocks));
.setStepSound(SoundType.STONE).setDisplay(deco.display).setTab(CheatTab.tabBlocks));
}
@ -515,14 +515,14 @@ public abstract class BlockRegistry {
}
registerBlock(2000, "core", new BlockCore().setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.PISTON)
registerBlock(2000, "core", new BlockCore().setHardness(1.5F).setResistance(10.0F).setStepSound(SoundType.STONE)
.setDisplay("Chunk-Lade-Kern"));
registerBlock(2001, "mob_spawner",
(new BlockMobSpawner()).setHardness(5.0F).setStepSound(SoundType.METAL).setDisplay("Monsterspawner"));
(new BlockMobSpawner()).setHardness(5.0F).setStepSound(SoundType.STONE).setDisplay("Monsterspawner"));
registerBlock(2002, "crafting_table", (new BlockWorkbench()).setHardness(2.5F).setStepSound(SoundType.WOOD).setDisplay("Werkbank"));
registerBlock(2003, "furnace", (new BlockFurnace(false)).setHardness(3.5F).setStepSound(SoundType.PISTON).setDisplay("Ofen")
registerBlock(2003, "furnace", (new BlockFurnace(false)).setHardness(3.5F).setStepSound(SoundType.STONE).setDisplay("Ofen")
.setTab(CheatTab.tabTech));
registerBlock(2004, "lit_furnace", (new BlockFurnace(true)).setHardness(3.5F).setStepSound(SoundType.PISTON).setLightLevel(0.875F)
registerBlock(2004, "lit_furnace", (new BlockFurnace(true)).setHardness(3.5F).setStepSound(SoundType.STONE).setLightLevel(0.875F)
.setDisplay("Ofen (Gefeuert)").setTab(CheatTab.tabTech));
registerBlock(2005, "anvil",
(new BlockAnvil()).setHardness(5.0F).setStepSound(SoundType.ANVIL).setResistance(2000.0F).setDisplay("Amboss"));
@ -533,11 +533,11 @@ public abstract class BlockRegistry {
registerBlock(2009, "beacon", (new BlockBeacon()).setDisplay("Leuchtfeuer").setLightLevel(1.0F));
registerBlock(2010, "noteblock", (new BlockNote()).setHardness(0.8F).setDisplay("Notenblock"));
registerBlock(2011, "jukebox",
(new BlockJukebox()).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.PISTON).setDisplay("Plattenspieler"));
(new BlockJukebox()).setHardness(2.0F).setResistance(10.0F).setStepSound(SoundType.STONE).setDisplay("Plattenspieler"));
registerBlock(2100, "chest", (new BlockChest(0)).setHardness(2.5F).setStepSound(SoundType.WOOD).setDisplay("Truhe"));
registerBlock(2101, "trapped_chest", (new BlockChest(1)).setHardness(2.5F).setStepSound(SoundType.WOOD).setDisplay("Redstonetruhe"));
registerBlock(2102, "warp_chest", (new BlockWarpChest()).setHardness(22.5F).setResistance(1000.0F).setStepSound(SoundType.PISTON)
registerBlock(2102, "warp_chest", (new BlockWarpChest()).setHardness(22.5F).setResistance(1000.0F).setStepSound(SoundType.STONE)
.setDisplay("Warptruhe").setLightLevel(0.5F));
registerBlock(2200, "tnt", (new BlockTNT()).setHardness(0.0F).setStepSound(SoundType.GRASS).setDisplay("TNT"));
@ -547,25 +547,25 @@ public abstract class BlockRegistry {
registerBlock(2301, "sticky_piston", (new BlockPistonBase(true)).setDisplay("Klebriger Kolben"));
registerBlock(2302, "piston_head", (new BlockPistonHead()).setDisplay("Kolben"));
registerBlock(2303, "piston_extension", new BlockPistonMoving().setDisplay("Kolben"));
registerBlock(2304, "dispenser", (new BlockDispenser()).setHardness(3.5F).setStepSound(SoundType.PISTON).setDisplay("Werfer"));
registerBlock(2305, "dropper", (new BlockDropper()).setHardness(3.5F).setStepSound(SoundType.PISTON).setDisplay("Spender"));
registerBlock(2304, "dispenser", (new BlockDispenser()).setHardness(3.5F).setStepSound(SoundType.STONE).setDisplay("Werfer"));
registerBlock(2305, "dropper", (new BlockDropper()).setHardness(3.5F).setStepSound(SoundType.STONE).setDisplay("Spender"));
registerBlock(2306, "hopper",
(new BlockHopper()).setHardness(3.0F).setResistance(8.0F).setStepSound(SoundType.METAL).setDisplay("Trichter"));
(new BlockHopper()).setHardness(3.0F).setResistance(8.0F).setStepSound(SoundType.STONE).setDisplay("Trichter"));
registerBlock(2307, "tian_reactor",
(new BlockTianReactor()).setHardness(3.0F).setResistance(8.0F).setStepSound(SoundType.METAL).setDisplay("Tianreaktor"));
(new BlockTianReactor()).setHardness(3.0F).setResistance(8.0F).setStepSound(SoundType.STONE).setDisplay("Tianreaktor"));
registerBlock(2400, "rail", (new BlockRail()).setHardness(0.7F).setStepSound(SoundType.METAL).setDisplay("Schiene").setMiningLevel(0));
registerBlock(2400, "rail", (new BlockRail()).setHardness(0.7F).setStepSound(SoundType.STONE).setDisplay("Schiene").setMiningLevel(0));
registerBlock(2401, "golden_rail",
(new BlockRailPowered()).setHardness(0.7F).setStepSound(SoundType.METAL).setDisplay("Antriebsschiene").setMiningLevel(0));
(new BlockRailPowered()).setHardness(0.7F).setStepSound(SoundType.STONE).setDisplay("Antriebsschiene").setMiningLevel(0));
registerBlock(2402, "detector_rail",
(new BlockRailDetector()).setHardness(0.7F).setStepSound(SoundType.METAL).setDisplay("Sensorschiene").setMiningLevel(0));
(new BlockRailDetector()).setHardness(0.7F).setStepSound(SoundType.STONE).setDisplay("Sensorschiene").setMiningLevel(0));
registerBlock(2403, "activator_rail",
(new BlockRailPowered()).setHardness(0.7F).setStepSound(SoundType.METAL).setDisplay("Aktivierungsschiene").setMiningLevel(0));
(new BlockRailPowered()).setHardness(0.7F).setStepSound(SoundType.STONE).setDisplay("Aktivierungsschiene").setMiningLevel(0));
registerBlock(2500, "lever", (new BlockLever()).setHardness(0.5F).setStepSound(SoundType.WOOD).setDisplay("Hebel"));
registerBlock(2510, "stone_pressure_plate", (new BlockPressurePlate(Material.rock, BlockPressurePlate.Sensitivity.MOBS)).setHardness(0.5F)
.setStepSound(SoundType.PISTON).setDisplay("Steindruckplatte"));
.setStepSound(SoundType.STONE).setDisplay("Steindruckplatte"));
registerBlock(2511, "wooden_pressure_plate", (new BlockPressurePlate(Material.wood, BlockPressurePlate.Sensitivity.EVERYTHING))
.setHardness(0.5F).setStepSound(SoundType.WOOD).setDisplay("Holzdruckplatte"));
registerBlock(2512, "light_weighted_pressure_plate", (new BlockPressurePlateWeighted(Material.iron, 15)).setHardness(0.5F)
@ -573,9 +573,9 @@ public abstract class BlockRegistry {
registerBlock(2513, "heavy_weighted_pressure_plate", (new BlockPressurePlateWeighted(Material.iron, 150)).setHardness(0.5F)
.setStepSound(SoundType.WOOD).setDisplay("Wägeplatte (hohe Gewichte)"));
registerBlock(2520, "stone_button", (new BlockButton(false, 20, "stone")).setHardness(0.5F).setStepSound(SoundType.PISTON).setDisplay("Knopf"));
registerBlock(2520, "stone_button", (new BlockButton(false, 20, "stone")).setHardness(0.5F).setStepSound(SoundType.STONE).setDisplay("Knopf"));
registerBlock(2521, "wooden_button", (new BlockButton(true, 30, "oak_planks")).setHardness(0.5F).setStepSound(SoundType.WOOD).setDisplay("Knopf"));
registerBlock(2522, "red_button", (new BlockButton(true, 10, "red_button")).setHardness(0.5F).setStepSound(SoundType.PISTON).setDisplay("Knopf"));
registerBlock(2522, "red_button", (new BlockButton(true, 10, "red_button")).setHardness(0.5F).setStepSound(SoundType.STONE).setDisplay("Knopf"));
registerBlock(2600, "redstone",
(new BlockRedstoneWire()).setHardness(0.0F).setStepSound(SoundType.STONE).setDisplay("Redstone-Staub"));

View file

@ -84,7 +84,7 @@ public class ItemBlock extends Item
this.block.onBlockPlacedBy(worldIn, pos, iblockstate1, playerIn, stack);
}
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), (this.block.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
}

View file

@ -67,7 +67,7 @@ public class ItemHoe extends Item
protected boolean useHoe(ItemStack stack, EntityNPC player, World worldIn, BlockPos target, State newState)
{
if(newState.getBlock().sound.getStepSound() != null)
worldIn.playSound(newState.getBlock().sound.getStepSound(), (double)((float)target.getX() + 0.5F), (double)((float)target.getY() + 0.5F), (double)((float)target.getZ() + 0.5F), (newState.getBlock().sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(newState.getBlock().sound.getStepSound(), (double)((float)target.getX() + 0.5F), (double)((float)target.getY() + 0.5F), (double)((float)target.getZ() + 0.5F), 1.0F);
if (worldIn.client)
{

View file

@ -65,7 +65,7 @@ public class ItemReed extends Item
iblockstate1.getBlock().onBlockPlacedBy(worldIn, pos, iblockstate1, playerIn, stack);
}
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), (this.block.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
return true;
}

View file

@ -68,7 +68,7 @@ public class ItemSlab extends ItemBlock
if (worldIn.checkNoEntityCollision(this.slab.getCollisionBoundingBox(worldIn, pos, iblockstate1)) && worldIn.setState(pos, iblockstate1, 3))
{
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), (this.slab.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
}
@ -142,7 +142,7 @@ public class ItemSlab extends ItemBlock
if (worldIn.checkNoEntityCollision(this.slab.getCollisionBoundingBox(worldIn, pos, iblockstate1)) && worldIn.setState(pos, iblockstate1, 3))
{
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), (this.slab.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
}
@ -172,7 +172,7 @@ public class ItemSlab extends ItemBlock
if (worldIn.setState(pos, iblockstate1, 3))
{
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), (this.slab.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.slab.sound.getPlaceSound(), (double)((float)pos.getX() + 0.5F), (double)((float)pos.getY() + 0.5F), (double)((float)pos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
}

View file

@ -55,7 +55,7 @@ public class ItemSnow extends ItemBlock
if (axisalignedbb != null && worldIn.checkNoEntityCollision(axisalignedbb) && worldIn.setState(blockpos, iblockstate1, 2))
{
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), (this.block.sound.getVolume() + 1.0F) / 2.0F);
worldIn.playSound(this.block.sound.getPlaceSound(), (double)((float)blockpos.getX() + 0.5F), (double)((float)blockpos.getY() + 0.5F), (double)((float)blockpos.getZ() + 0.5F), 1.0F);
--stack.stackSize;
return true;
}

View file

@ -290,7 +290,7 @@ public class PlayerController
if (this.stepSoundTickCounter % 4.0F == 0.0F && block.sound.getStepSound() != null)
{
this.gm.getSoundManager().playSound(new PositionedSound(block.sound.getStepSound(), (block.sound.getVolume() + 1.0F) / 8.0F, /* block.sound.getFrequency() * 0.5F, */ (float)posBlock.getX() + 0.5F, (float)posBlock.getY() + 0.5F, (float)posBlock.getZ() + 0.5F));
this.gm.getSoundManager().playSound(new PositionedSound(block.sound.getStepSound(), 0.25F, /* block.sound.getFrequency() * 0.5F, */ (float)posBlock.getX() + 0.5F, (float)posBlock.getY() + 0.5F, (float)posBlock.getZ() + 0.5F));
}
++this.stepSoundTickCounter;

View file

@ -584,7 +584,7 @@ public class WorldClient extends World
if (block.getMaterial() != Material.air)
{
this.gm.getSoundManager().playSound(new PositionedSound(block.sound.getBreakSound(), (block.sound.getVolume() + 1.0F) / 2.0F, /* block.sound.getFrequency() * 0.8F, */ (float)blockPosIn.getX() + 0.5F, (float)blockPosIn.getY() + 0.5F, (float)blockPosIn.getZ() + 0.5F));
this.gm.getSoundManager().playSound(new PositionedSound(block.sound.getBreakSound(), 1.0F, /* block.sound.getFrequency() * 0.8F, */ (float)blockPosIn.getX() + 0.5F, (float)blockPosIn.getY() + 0.5F, (float)blockPosIn.getZ() + 0.5F));
}
this.gm.effectRenderer.addBlockDestroyEffects(blockPosIn, block.getStateFromMeta(data >> 12 & 255));