@Override public ResourceLocation getSound() { return EsteemedInnovation.SOUND_WHISTLE.getSoundName(); }
public SoundBase(SoundEvent sound, SoundCategory category, float volume, float pitch, boolean repeat, int repeatDelay, double x, double y, double z) { this(sound.getSoundName(), category, volume, pitch, repeat, repeatDelay, x, y, z, AttenuationType.LINEAR); }
public SoundBase(SoundEvent sound, SoundCategory category, float volume, float pitch, boolean repeat, int repeatDelay) { this(sound.getSoundName(), category, volume, pitch, repeat, repeatDelay, 0, 0, 0, AttenuationType.NONE); }
@SideOnly(Side.CLIENT) public String name() { return sound != null ? sound.getSoundName().toString() : ""; }
@SideOnly(Side.CLIENT) public void setSound(@Nullable SoundEvent sound) { this.sound = sound; if (sound != null) { boolean isRecord = sound.getSoundName().getResourcePath().startsWith("records.") || ItemRecord.getBySound(sound) != null; if (isRecord && length() < 120) setLength(120); } }
public void update() { if (currentSound != null) { if (!ModSounds.MUSIC_EREBUS_DIMENSION.getSoundName().equals(currentSound.getSoundLocation())) { mc.getSoundHandler().stopSound(currentSound); timeUntilMusic = MathHelper.getInt(RNG, 0, MIN_WAIT / 2); } if (!mc.getSoundHandler().isSoundPlaying(currentSound)) { currentSound = null; timeUntilMusic = Math.min(MathHelper.getInt(RNG, MIN_WAIT, MAX_WAIT), timeUntilMusic); } } if (currentSound == null && timeUntilMusic-- <= 0) { currentSound = PositionedSoundRecord.getMusicRecord(ModSounds.MUSIC_EREBUS_DIMENSION); mc.getSoundHandler().playSound(currentSound); timeUntilMusic = Integer.MAX_VALUE; } } }
public SidePannel(MOGuiBase gui, int posX, int posY, int height, boolean openable) { super(gui, posX, posY, 37, height); MOElementButtonScaled button = new MOElementButtonScaled(gui, this, 0, 0, "Toggle", 16, height); button.setNormalTexture(new ScaleTexture(new ResourceLocation(Reference.PATH_ELEMENTS + "right_side_bar_over.png"), 32, 143).setOffsets(0, 0, 42, 100)); button.setOverTexture(new ScaleTexture(new ResourceLocation(Reference.PATH_ELEMENTS + "right_side_bar_over.png"), 32, 143).setOffsets(0, 0, 42, 100)); button.setSounds(MatterOverdriveSounds.guiButtonExpand.getSoundName()); this.button = button; this.openable = openable; }