SteamWar/FightSystem
Archiviert
13
1

Fix Arenas below 0 in Replays
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2023-03-04 13:10:30 +01:00
Ursprung b8199eb04d
Commit e2e677c789
2 geänderte Dateien mit 13 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -121,7 +121,8 @@ public class PacketProcessor implements Listener {
packetDecoder[0x0a] = this::bow; packetDecoder[0x0a] = this::bow;
packetDecoder[0x0b] = this::damage; packetDecoder[0x0b] = this::damage;
packetDecoder[0x0c] = this::fireTick; packetDecoder[0x0c] = this::fireTick;
packetDecoder[0x20] = this::arenaInfo; packetDecoder[0x20] = this::oldArenaInfo;
packetDecoder[0x21] = this::arenaInfo;
packetDecoder[0x30] = this::byteWorldHeightBlock; packetDecoder[0x30] = this::byteWorldHeightBlock;
packetDecoder[0x31] = this::particle; packetDecoder[0x31] = this::particle;
packetDecoder[0x32] = this::sound; packetDecoder[0x32] = this::sound;
@ -367,13 +368,20 @@ public class PacketProcessor implements Listener {
Bukkit.getOnlinePlayers().forEach(p -> Countdown.sendCountdownMessage(p, message, displaytime, appendix)); Bukkit.getOnlinePlayers().forEach(p -> Countdown.sendCountdownMessage(p, message, displaytime, appendix));
} }
private void arenaInfo() throws IOException { private void oldArenaInfo() throws IOException {
rotateZ = source.readBoolean() != Config.blueNegZ(); rotateZ = source.readBoolean() != Config.blueNegZ();
arenaMinY = Byte.toUnsignedInt(source.readByte()); arenaMinY = Byte.toUnsignedInt(source.readByte());
arenaMinX = source.readInt(); arenaMinX = source.readInt();
arenaMinZ = source.readInt(); arenaMinZ = source.readInt();
} }
private void arenaInfo() throws IOException {
rotateZ = source.readBoolean() != Config.blueNegZ();
arenaMinX = source.readInt();
arenaMinY = source.readInt();
arenaMinZ = source.readInt();
}
private void shortBlock() throws IOException { private void shortBlock() throws IOException {
int x = Byte.toUnsignedInt(source.readByte()) + Config.ArenaRegion.getMinX(); int x = Byte.toUnsignedInt(source.readByte()) + Config.ArenaRegion.getMinX();
int y = Byte.toUnsignedInt(source.readByte()); int y = Byte.toUnsignedInt(source.readByte());

Datei anzeigen

@ -98,7 +98,8 @@ public interface Recorder {
* PlayerDamagePacket (0x0b) + int EntityId * PlayerDamagePacket (0x0b) + int EntityId
* SetOnFire (0x0c) + int EntityId + boolean perma * SetOnFire (0x0c) + int EntityId + boolean perma
* *
* ArenaInfo (0x20) + bool blueNegZ + byte arenaY + int arenaMinX + int arenaMinZ * DEPRECATED ArenaInfo (0x20) + bool blueNegZ + byte arenaY + int arenaMinX + int arenaMinZ
* ArenaInfo (0x21) + bool blueNegZ + int arenaMinX + int arenaMinY + int arenaMinZ
* *
* DEPRECATED BlockPacket (0x30) + pos int, byte, int + int BlockState * DEPRECATED BlockPacket (0x30) + pos int, byte, int + int BlockState
* ParticlePacket (0x31) + double x, y, z + string particleType * ParticlePacket (0x31) + double x, y, z + string particleType
@ -213,8 +214,7 @@ public interface Recorder {
} }
default void arenaInfo(){ default void arenaInfo(){
write(0x20, Config.blueNegZ(), (byte)Config.BluePasteRegion.getMinY(), write(0x21, Config.blueNegZ(), Config.ArenaRegion.getMinX(), Config.BluePasteRegion.getMinY(), Config.ArenaRegion.getMinZ());
Config.ArenaRegion.getMinX(), Config.ArenaRegion.getMinZ());
} }
default void blockChange(Block block){ default void blockChange(Block block){