block sounds
This commit is contained in:
parent
c602585e6a
commit
47b9ecbb94
14 changed files with 123 additions and 193 deletions
|
@ -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 final SoundEvent breakSound;
|
||||
private final SoundEvent placeSound;
|
||||
private final SoundEvent stepSound;
|
||||
|
||||
private SoundType(SoundEvent breakSound, SoundEvent placeSound, SoundEvent stepSound, float volume)
|
||||
{
|
||||
this.breakSound = breakSound;
|
||||
this.placeSound = placeSound;
|
||||
this.stepSound = stepSound;
|
||||
this.volume = volume;
|
||||
}
|
||||
private SoundType(SoundEvent breakSound, SoundEvent placeSound, SoundEvent stepSound) {
|
||||
this.breakSound = breakSound;
|
||||
this.placeSound = placeSound;
|
||||
this.stepSound = stepSound;
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
return this.breakSound;
|
||||
}
|
||||
public SoundEvent getBreakSound() {
|
||||
return this.breakSound;
|
||||
}
|
||||
|
||||
public SoundEvent getPlaceSound()
|
||||
{
|
||||
return this.placeSound;
|
||||
}
|
||||
public SoundEvent getPlaceSound() {
|
||||
return this.placeSound;
|
||||
}
|
||||
|
||||
public SoundEvent getStepSound()
|
||||
{
|
||||
return this.stepSound;
|
||||
}
|
||||
|
||||
public float getVolume()
|
||||
{
|
||||
return this.volume;
|
||||
}
|
||||
public SoundEvent getStepSound() {
|
||||
return this.stepSound;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue