1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-08-29 08:42:17 +00:00

Fix playNote not working for Speaker peripheral.

This commit is contained in:
Jacob Farley 2020-09-06 11:21:20 -05:00
parent c346e22a45
commit 2546990f41
3 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ public class PlayRecordClientMessage implements NetworkMessage {
} else {
buf.writeBoolean(true);
buf.writeString(this.name);
buf.writeIdentifier(this.soundEvent.getId());
buf.writeIdentifier(this.soundEvent.id);
}
}

View File

@ -153,8 +153,7 @@ public abstract class SpeakerPeripheral implements IPeripheral {
// If the resource location for note block notes changes, this method call will need to be updated
boolean success = this.playSound(context,
instrument.getSound()
.getId(),
instrument.getSound().id,
volume,
(float) Math.pow(2.0, (pitch - 12.0) / 12.0),
true);

View File

@ -20,3 +20,4 @@ accessible field net/minecraft/client/render/model/BakedQuad sprite Lnet/minecra
accessible field net/minecraft/client/util/math/AffineTransformation translation Lnet/minecraft/client/util/math/Vector3f;
accessible field net/minecraft/client/util/math/AffineTransformation scale Lnet/minecraft/client/util/math/Vector3f;
accessible field net/minecraft/client/util/math/AffineTransformation rotation1 Lnet/minecraft/util/math/Quaternion;
accessible field net/minecraft/sound/SoundEvent id Lnet/minecraft/util/Identifier;