mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -04:00
PacketSoundEffect, PacketNamedSoundEffect: fix reading category
This commit is contained in:
parent
8901f38824
commit
ff09e06647
@ -43,11 +43,9 @@ public class PacketNamedSoundEffect implements ClientboundPacket {
|
||||
location = new Location(buffer.readInt() * 8, buffer.readInt() * 8, buffer.readInt() * 8); // ToDo: check if it is not * 4
|
||||
}
|
||||
|
||||
if (buffer.getProtocolId() < 321 && buffer.getProtocolId() >= 326) {
|
||||
if (buffer.getProtocolId() >= 95) {
|
||||
if (buffer.getProtocolId() >= 95 && (buffer.getProtocolId() < 321 || buffer.getProtocolId() >= 326)) {
|
||||
category = SoundCategories.byId(buffer.readVarInt());
|
||||
}
|
||||
}
|
||||
if (buffer.getProtocolId() >= 95) {
|
||||
location = new Location(buffer.readFixedPointNumberInteger() * 4, buffer.readFixedPointNumberInteger() * 4, buffer.readFixedPointNumberInteger() * 4);
|
||||
}
|
||||
|
@ -39,11 +39,9 @@ public class PacketSoundEffect implements ClientboundPacket {
|
||||
if (buffer.getProtocolId() >= 321 && buffer.getProtocolId() < 326) {
|
||||
buffer.readString(); // parrot entity type
|
||||
}
|
||||
if (buffer.getProtocolId() < 321 && buffer.getProtocolId() >= 326) {
|
||||
if (buffer.getProtocolId() >= 95) {
|
||||
if (buffer.getProtocolId() >= 95 && (buffer.getProtocolId() < 321 || buffer.getProtocolId() >= 326)) {
|
||||
category = SoundCategories.byId(buffer.readVarInt());
|
||||
}
|
||||
}
|
||||
location = new Location(buffer.readFixedPointNumberInteger() * 4, buffer.readFixedPointNumberInteger() * 4, buffer.readFixedPointNumberInteger() * 4);
|
||||
volume = buffer.readFloat();
|
||||
if (buffer.getProtocolId() < 201) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user