diff --git a/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingPacket.java b/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingPacket.java index 5a928b08..68e74344 100644 --- a/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingPacket.java +++ b/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingPacket.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.network.example; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import org.geysermc.mcprotocollib.network.packet.Packet; -import io.netty.buffer.ByteBuf; public class PingPacket implements Packet { private final String id; diff --git a/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingServerTest.java b/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingServerTest.java index b8941880..0e95f3fd 100644 --- a/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingServerTest.java +++ b/example/src/main/java/org/geysermc/mcprotocollib/network/example/PingServerTest.java @@ -16,7 +16,7 @@ public class PingServerTest { KeyGenerator gen = KeyGenerator.getInstance("AES"); gen.init(128); key = gen.generateKey(); - } catch(NoSuchAlgorithmException e) { + } catch (NoSuchAlgorithmException e) { System.err.println("AES algorithm not supported, exiting..."); return; } diff --git a/example/src/main/java/org/geysermc/mcprotocollib/network/example/TestProtocol.java b/example/src/main/java/org/geysermc/mcprotocollib/network/example/TestProtocol.java index 6d9af24c..70eb9cf3 100644 --- a/example/src/main/java/org/geysermc/mcprotocollib/network/example/TestProtocol.java +++ b/example/src/main/java/org/geysermc/mcprotocollib/network/example/TestProtocol.java @@ -1,5 +1,6 @@ package org.geysermc.mcprotocollib.network.example; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.network.Server; import org.geysermc.mcprotocollib.network.Session; import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper; @@ -11,7 +12,6 @@ import org.geysermc.mcprotocollib.network.crypt.PacketEncryption; import org.geysermc.mcprotocollib.network.packet.DefaultPacketHeader; import org.geysermc.mcprotocollib.network.packet.PacketHeader; import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import io.netty.buffer.ByteBuf; import javax.crypto.SecretKey; import java.security.GeneralSecurityException; diff --git a/example/src/main/java/org/geysermc/mcprotocollib/protocol/example/MinecraftProtocolTest.java b/example/src/main/java/org/geysermc/mcprotocollib/protocol/example/MinecraftProtocolTest.java index ffe75daa..db88bcae 100644 --- a/example/src/main/java/org/geysermc/mcprotocollib/protocol/example/MinecraftProtocolTest.java +++ b/example/src/main/java/org/geysermc/mcprotocollib/protocol/example/MinecraftProtocolTest.java @@ -5,22 +5,9 @@ import com.github.steveice10.mc.auth.exception.request.RequestException; import com.github.steveice10.mc.auth.service.AuthenticationService; import com.github.steveice10.mc.auth.service.MojangAuthenticationService; import com.github.steveice10.mc.auth.service.SessionService; -import org.geysermc.mcprotocollib.protocol.MinecraftConstants; -import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; -import org.geysermc.mcprotocollib.protocol.ServerLoginHandler; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodec; -import org.geysermc.mcprotocollib.protocol.data.ProtocolState; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo; -import org.geysermc.mcprotocollib.protocol.data.status.PlayerInfo; -import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; -import org.geysermc.mcprotocollib.protocol.data.status.VersionInfo; -import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerInfoBuilder; -import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerInfoHandler; -import org.geysermc.mcprotocollib.protocol.data.status.handler.ServerPingTimeHandler; -import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket; -import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; +import net.kyori.adventure.text.format.TextDecoration; import org.geysermc.mcprotocollib.network.ProxyInfo; import org.geysermc.mcprotocollib.network.Server; import org.geysermc.mcprotocollib.network.Session; @@ -33,9 +20,18 @@ import org.geysermc.mcprotocollib.network.event.session.SessionAdapter; import org.geysermc.mcprotocollib.network.packet.Packet; import org.geysermc.mcprotocollib.network.tcp.TcpClientSession; import org.geysermc.mcprotocollib.network.tcp.TcpServer; -import net.kyori.adventure.text.Component; -import net.kyori.adventure.text.format.NamedTextColor; -import net.kyori.adventure.text.format.TextDecoration; +import org.geysermc.mcprotocollib.protocol.MinecraftConstants; +import org.geysermc.mcprotocollib.protocol.MinecraftProtocol; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodec; +import org.geysermc.mcprotocollib.protocol.data.ProtocolState; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo; +import org.geysermc.mcprotocollib.protocol.data.status.PlayerInfo; +import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; +import org.geysermc.mcprotocollib.protocol.data.status.VersionInfo; +import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundSystemChatPacket; +import org.geysermc.mcprotocollib.protocol.packet.ingame.serverbound.ServerboundChatPacket; import java.net.Proxy; import java.nio.charset.StandardCharsets; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/AbstractServer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/AbstractServer.java index 6267193e..48ee44cd 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/AbstractServer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/AbstractServer.java @@ -1,9 +1,19 @@ package org.geysermc.mcprotocollib.network; -import org.geysermc.mcprotocollib.network.event.server.*; +import org.geysermc.mcprotocollib.network.event.server.ServerBoundEvent; +import org.geysermc.mcprotocollib.network.event.server.ServerClosedEvent; +import org.geysermc.mcprotocollib.network.event.server.ServerClosingEvent; +import org.geysermc.mcprotocollib.network.event.server.ServerEvent; +import org.geysermc.mcprotocollib.network.event.server.ServerListener; +import org.geysermc.mcprotocollib.network.event.server.SessionAddedEvent; +import org.geysermc.mcprotocollib.network.event.server.SessionRemovedEvent; import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import java.util.function.Supplier; public abstract class AbstractServer implements Server { @@ -59,13 +69,13 @@ public abstract class AbstractServer implements Server { @Override public T getGlobalFlag(Flag flag, T def) { Object value = this.flags.get(flag.key()); - if(value == null) { + if (value == null) { return def; } try { return flag.cast(value); - } catch(ClassCastException e) { + } catch (ClassCastException e) { throw new IllegalStateException("Tried to get flag \"" + flag.key() + "\" as the wrong type. Actual type: " + value.getClass().getName()); } } @@ -91,7 +101,7 @@ public abstract class AbstractServer implements Server { } protected void callEvent(ServerEvent event) { - for(ServerListener listener : this.listeners) { + for (ServerListener listener : this.listeners) { event.call(listener); } } @@ -108,7 +118,7 @@ public abstract class AbstractServer implements Server { public void removeSession(Session session) { this.sessions.remove(session); - if(session.isConnected()) { + if (session.isConnected()) { session.disconnect("Connection closed."); } @@ -129,7 +139,7 @@ public abstract class AbstractServer implements Server { public AbstractServer bind(boolean wait, Runnable callback) { this.bindImpl(wait, () -> { callEvent(new ServerBoundEvent(AbstractServer.this)); - if(callback != null) { + if (callback != null) { callback.run(); } }); @@ -152,15 +162,15 @@ public abstract class AbstractServer implements Server { @Override public void close(boolean wait, Runnable callback) { this.callEvent(new ServerClosingEvent(this)); - for(Session session : this.getSessions()) { - if(session.isConnected()) { + for (Session session : this.getSessions()) { + if (session.isConnected()) { session.disconnect("Server closed."); } } this.closeImpl(wait, () -> { callEvent(new ServerClosedEvent(AbstractServer.this)); - if(callback != null) { + if (callback != null) { callback.run(); } }); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/ProxyInfo.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/ProxyInfo.java index 33844a58..c09605a7 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/ProxyInfo.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/ProxyInfo.java @@ -15,7 +15,7 @@ public class ProxyInfo { /** * Creates a new unauthenticated ProxyInfo instance. * - * @param type Type of proxy. + * @param type Type of proxy. * @param address Network address of the proxy. */ public ProxyInfo(Type type, SocketAddress address) { @@ -27,7 +27,7 @@ public class ProxyInfo { /** * Creates a new authenticated ProxyInfo instance. * - * @param type Type of proxy. + * @param type Type of proxy. * @param address Network address of the proxy. * @param username Username to authenticate with. * @param password Password to authenticate with. diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/Server.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/Server.java index 4dee9ad7..070f7b84 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/Server.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/Server.java @@ -132,7 +132,7 @@ public interface Server { /** * Binds the listener to its host and port. * - * @param wait Whether to wait for the listener to finish binding. + * @param wait Whether to wait for the listener to finish binding. * @param callback Callback to call when the listener has finished binding. * @return The server. */ @@ -153,7 +153,7 @@ public interface Server { /** * Closes the listener. * - * @param wait Whether to wait for the listener to finish closing. + * @param wait Whether to wait for the listener to finish closing. * @param callback Callback to call when the listener has finished closing. */ void close(boolean wait, Runnable callback); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java index 0ffab82d..30bfe812 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/Session.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.network; +import net.kyori.adventure.text.Component; +import org.checkerframework.checker.nullness.qual.Nullable; import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import org.geysermc.mcprotocollib.network.crypt.PacketEncryption; import org.geysermc.mcprotocollib.network.event.session.SessionEvent; import org.geysermc.mcprotocollib.network.event.session.SessionListener; import org.geysermc.mcprotocollib.network.packet.Packet; import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import net.kyori.adventure.text.Component; -import org.checkerframework.checker.nullness.qual.Nullable; import java.net.SocketAddress; import java.util.List; @@ -270,7 +270,7 @@ public interface Session { * Disconnects the session. * * @param reason Reason for disconnecting. - * @param cause Throwable responsible for disconnecting. + * @param cause Throwable responsible for disconnecting. */ void disconnect(@Nullable String reason, Throwable cause); @@ -285,7 +285,7 @@ public interface Session { * Disconnects the session. * * @param reason Reason for disconnecting. - * @param cause Throwable responsible for disconnecting. + * @param cause Throwable responsible for disconnecting. */ void disconnect(@Nullable Component reason, Throwable cause); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketDefinition.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketDefinition.java index de91d0a4..4c4528df 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketDefinition.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketDefinition.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.codec; -import org.geysermc.mcprotocollib.network.packet.Packet; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.network.packet.Packet; /** * Represents a definition of a packet with various diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketSerializer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketSerializer.java index 5f4d1554..d3f06657 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketSerializer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/codec/PacketSerializer.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.codec; -import org.geysermc.mcprotocollib.network.packet.Packet; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.network.packet.Packet; public interface PacketSerializer { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/crypt/PacketEncryption.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/crypt/PacketEncryption.java index a68e5bfa..6771a13f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/crypt/PacketEncryption.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/crypt/PacketEncryption.java @@ -23,10 +23,10 @@ public interface PacketEncryption { /** * Decrypts the given data. * - * @param input Input data to decrypt. - * @param inputOffset Offset of the data to start decrypting at. - * @param inputLength Length of the data to be decrypted. - * @param output Array to output decrypted data to. + * @param input Input data to decrypt. + * @param inputOffset Offset of the data to start decrypting at. + * @param inputLength Length of the data to be decrypted. + * @param output Array to output decrypted data to. * @param outputOffset Offset of the output array to start at. * @return The number of bytes stored in the output array. * @throws Exception If an error occurs. @@ -36,10 +36,10 @@ public interface PacketEncryption { /** * Encrypts the given data. * - * @param input Input data to encrypt. - * @param inputOffset Offset of the data to start encrypting at. - * @param inputLength Length of the data to be encrypted. - * @param output Array to output encrypted data to. + * @param input Input data to encrypt. + * @param inputOffset Offset of the data to start encrypting at. + * @param inputLength Length of the data to be encrypted. + * @param output Array to output encrypted data to. * @param outputOffset Offset of the output array to start at. * @return The number of bytes stored in the output array. * @throws Exception If an error occurs. diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionAddedEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionAddedEvent.java index b5ecef57..72f7c378 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionAddedEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionAddedEvent.java @@ -13,7 +13,7 @@ public class SessionAddedEvent implements ServerEvent { /** * Creates a new SessionAddedEvent instance. * - * @param server Server the session is being added to. + * @param server Server the session is being added to. * @param session Session being added. */ public SessionAddedEvent(Server server, Session session) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionRemovedEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionRemovedEvent.java index 6a594918..7422470d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionRemovedEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/server/SessionRemovedEvent.java @@ -13,7 +13,7 @@ public class SessionRemovedEvent implements ServerEvent { /** * Creates a new SessionRemovedEvent instance. * - * @param server Server the session is being removed from. + * @param server Server the session is being removed from. * @param session Session being removed. */ public SessionRemovedEvent(Server server, Session session) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectedEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectedEvent.java index 493b78d0..3b854c17 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectedEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectedEvent.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.event.session; -import org.geysermc.mcprotocollib.network.Session; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.network.Session; /** * Called when the session is disconnected. @@ -15,8 +15,8 @@ public class DisconnectedEvent implements SessionEvent { * Creates a new DisconnectedEvent instance. * * @param session Session being disconnected. - * @param reason Reason for the session to disconnect. - * @param cause Throwable that caused the disconnect. + * @param reason Reason for the session to disconnect. + * @param cause Throwable that caused the disconnect. */ public DisconnectedEvent(Session session, Component reason, Throwable cause) { this.session = session; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectingEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectingEvent.java index 936f449e..b33e8a11 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectingEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/DisconnectingEvent.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.event.session; -import org.geysermc.mcprotocollib.network.Session; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.network.Session; /** * Called when the session is about to disconnect. @@ -15,8 +15,8 @@ public class DisconnectingEvent implements SessionEvent { * Creates a new DisconnectingEvent instance. * * @param session Session being disconnected. - * @param reason Reason for the session to disconnect. - * @param cause Throwable that caused the disconnect. + * @param reason Reason for the session to disconnect. + * @param cause Throwable that caused the disconnect. */ public DisconnectingEvent(Session session, Component reason, Throwable cause) { this.session = session; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketErrorEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketErrorEvent.java index 9eb0e009..e812ee59 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketErrorEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketErrorEvent.java @@ -14,7 +14,7 @@ public class PacketErrorEvent implements SessionEvent { * Creates a new SessionErrorEvent instance. * * @param session Session that the error came from. - * @param cause Cause of the error. + * @param cause Cause of the error. */ public PacketErrorEvent(Session session, Throwable cause) { this.session = session; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketSendingEvent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketSendingEvent.java index 5b658d6a..bb9b67ac 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketSendingEvent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/PacketSendingEvent.java @@ -15,7 +15,7 @@ public class PacketSendingEvent implements SessionEvent { * Creates a new PacketSendingEvent instance. * * @param session Session sending the packet. - * @param packet Packet being sent. + * @param packet Packet being sent. */ public PacketSendingEvent(Session session, Packet packet) { this.session = session; @@ -42,7 +42,7 @@ public class PacketSendingEvent implements SessionEvent { public T getPacket() { try { return (T) this.packet; - } catch(ClassCastException e) { + } catch (ClassCastException e) { throw new IllegalStateException("Tried to get packet as the wrong type. Actual type: " + this.packet.getClass().getName()); } } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/SessionAdapter.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/SessionAdapter.java index 4da5fc50..177ec8d2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/SessionAdapter.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/event/session/SessionAdapter.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.event.session; -import org.geysermc.mcprotocollib.network.packet.Packet; import org.geysermc.mcprotocollib.network.Session; +import org.geysermc.mcprotocollib.network.packet.Packet; /** * An adapter for picking session events to listen for. diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/helper/TransportHelper.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/helper/TransportHelper.java index 906fd44d..7f1f611d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/helper/TransportHelper.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/helper/TransportHelper.java @@ -10,7 +10,8 @@ public class TransportHelper { } public static TransportMethod determineTransportMethod() { - if (isClassAvailable("io.netty.incubator.channel.uring.IOUring") && IOUring.isAvailable()) return TransportMethod.IO_URING; + if (isClassAvailable("io.netty.incubator.channel.uring.IOUring") && IOUring.isAvailable()) + return TransportMethod.IO_URING; if (isClassAvailable("io.netty.channel.epoll.Epoll") && Epoll.isAvailable()) return TransportMethod.EPOLL; if (isClassAvailable("io.netty.channel.kqueue.KQueue") && KQueue.isAvailable()) return TransportMethod.KQUEUE; return TransportMethod.NIO; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/BufferedPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/BufferedPacket.java index 8dd21560..04789935 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/BufferedPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/BufferedPacket.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.network.packet; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import org.geysermc.mcprotocollib.network.codec.PacketDefinition; import org.geysermc.mcprotocollib.network.codec.PacketSerializer; -import io.netty.buffer.ByteBuf; public class BufferedPacket implements Packet, PacketSerializer { private final Class packetClass; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/DefaultPacketHeader.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/DefaultPacketHeader.java index 9cd20b7f..d73fbd49 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/DefaultPacketHeader.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/DefaultPacketHeader.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.packet; -import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; /** * The default packet header, using a varint packet length and id. @@ -19,13 +19,13 @@ public class DefaultPacketHeader implements PacketHeader { @Override public int getLengthSize(int length) { - if((length & -128) == 0) { + if ((length & -128) == 0) { return 1; - } else if((length & -16384) == 0) { + } else if ((length & -16384) == 0) { return 2; - } else if((length & -2097152) == 0) { + } else if ((length & -2097152) == 0) { return 3; - } else if((length & -268435456) == 0) { + } else if ((length & -268435456) == 0) { return 4; } else { return 5; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketHeader.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketHeader.java index 38a1bd74..c814a7e1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketHeader.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketHeader.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.network.packet; -import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; /** * The header of a protocol's packets. @@ -32,9 +32,9 @@ public interface PacketHeader { /** * Reads the length of a packet from the given input. * - * @param buf Buffer to read from. + * @param buf Buffer to read from. * @param codecHelper The codec helper. - * @param available Number of packet bytes available after the length. + * @param available Number of packet bytes available after the length. * @return The resulting packet length. */ int readLength(ByteBuf buf, PacketCodecHelper codecHelper, int available); @@ -42,16 +42,16 @@ public interface PacketHeader { /** * Writes the length of a packet to the given output. * - * @param buf Buffer to write to. + * @param buf Buffer to write to. * @param codecHelper The codec helper. - * @param length Length to write. + * @param length Length to write. */ void writeLength(ByteBuf buf, PacketCodecHelper codecHelper, int length); /** * Reads the ID of a packet from the given input. * - * @param buf Buffer to read from. + * @param buf Buffer to read from. * @param codecHelper The codec helper. * @return The resulting packet ID, or -1 if the packet should not be read yet. */ @@ -60,9 +60,9 @@ public interface PacketHeader { /** * Writes the ID of a packet to the given output. * - * @param buf Buffer to write to. + * @param buf Buffer to write to. * @param codecHelper The codec helper. - * @param packetId Packet ID to write. + * @param packetId Packet ID to write. */ void writePacketId(ByteBuf buf, PacketCodecHelper codecHelper, int packetId); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketProtocol.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketProtocol.java index 7e3df73f..d9bf196d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketProtocol.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/packet/PacketProtocol.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.network.packet; -import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; -import org.geysermc.mcprotocollib.network.codec.PacketDefinition; -import org.geysermc.mcprotocollib.network.codec.PacketSerializer; -import org.geysermc.mcprotocollib.network.Server; -import org.geysermc.mcprotocollib.network.Session; import io.netty.buffer.ByteBuf; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import org.geysermc.mcprotocollib.network.Server; +import org.geysermc.mcprotocollib.network.Session; +import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; +import org.geysermc.mcprotocollib.network.codec.PacketDefinition; +import org.geysermc.mcprotocollib.network.codec.PacketSerializer; import java.util.IdentityHashMap; import java.util.Map; @@ -56,7 +56,7 @@ public abstract class PacketProtocol { /** * Called when a server session is created with this protocol. * - * @param server The server that the session belongs to. + * @param server The server that the session belongs to. * @param session The created session. */ public abstract void newServerSession(Server server, Session session); @@ -74,8 +74,8 @@ public abstract class PacketProtocol { /** * Registers a packet to this protocol as both serverbound and clientbound. * - * @param id Id to register the packet to. - * @param packet Packet to register. + * @param id Id to register the packet to. + * @param packet Packet to register. * @param serializer The packet serializer. * @throws IllegalArgumentException If the packet fails a test creation when being registered as serverbound. */ @@ -98,8 +98,8 @@ public abstract class PacketProtocol { /** * Registers a serverbound packet to this protocol. * - * @param id Id to register the packet to. - * @param packet Packet to register. + * @param id Id to register the packet to. + * @param packet Packet to register. * @param serializer The packet serializer. * @throws IllegalArgumentException If the packet fails a test creation. */ @@ -120,8 +120,8 @@ public abstract class PacketProtocol { /** * Registers a clientbound packet to this protocol. * - * @param id Id to register the packet to. - * @param packet Packet to register. + * @param id Id to register the packet to. + * @param packet Packet to register. * @param serializer The packet serializer. */ public final void registerClientbound(int id, Class packet, PacketSerializer serializer) { @@ -141,8 +141,8 @@ public abstract class PacketProtocol { /** * Creates a new instance of a clientbound packet with the given id and read the clientbound input. * - * @param id Id of the packet to create. - * @param buf The buffer to read the packet from. + * @param id Id of the packet to create. + * @param buf The buffer to read the packet from. * @param codecHelper The codec helper. * @return The created packet. * @throws IllegalArgumentException If the packet ID is not registered. @@ -166,7 +166,7 @@ public abstract class PacketProtocol { */ public int getClientboundId(Class packetClass) { Integer packetId = this.clientboundIds.get(packetClass); - if(packetId == null) { + if (packetId == null) { throw new IllegalArgumentException("Unregistered clientbound packet class: " + packetClass.getName()); } @@ -190,6 +190,7 @@ public abstract class PacketProtocol { /** * Gets the packet class for a packet id. + * * @param id The packet id. * @return The registered packet's class * @throws IllegalArgumentException If the packet ID is not registered. @@ -206,8 +207,8 @@ public abstract class PacketProtocol { /** * Creates a new instance of a serverbound packet with the given id and read the serverbound input. * - * @param id Id of the packet to create. - * @param buf The buffer to read the packet from. + * @param id Id of the packet to create. + * @param buf The buffer to read the packet from. * @param codecHelper The codec helper. * @return The created packet. * @throws IllegalArgumentException If the packet ID is not registered. @@ -255,6 +256,7 @@ public abstract class PacketProtocol { /** * Gets the packet class for a packet id. + * * @param id The packet id. * @return The registered packet's class * @throws IllegalArgumentException If the packet ID is not registered. diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpBundlerUnpacker.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpBundlerUnpacker.java index e632b033..b702a670 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpBundlerUnpacker.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpBundlerUnpacker.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.network.tcp; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.MessageToMessageDecoder; import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBundlePacket; import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundDelimiterPacket; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.MessageToMessageDecoder; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpClientSession.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpClientSession.java index da310925..f2c6016b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpClientSession.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpClientSession.java @@ -1,21 +1,25 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.BuiltinFlags; -import org.geysermc.mcprotocollib.network.ProxyInfo; -import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; -import org.geysermc.mcprotocollib.network.helper.TransportHelper; -import org.geysermc.mcprotocollib.network.packet.PacketProtocol; import io.netty.bootstrap.Bootstrap; import io.netty.buffer.ByteBuf; +import io.netty.channel.AddressedEnvelope; +import io.netty.channel.Channel; +import io.netty.channel.ChannelException; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.EventLoopGroup; import io.netty.channel.epoll.EpollDatagramChannel; import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.epoll.EpollSocketChannel; -import io.netty.channel.nio.NioEventLoopGroup; -import io.netty.channel.socket.DatagramChannel; -import io.netty.channel.*; import io.netty.channel.kqueue.KQueueDatagramChannel; import io.netty.channel.kqueue.KQueueEventLoopGroup; import io.netty.channel.kqueue.KQueueSocketChannel; +import io.netty.channel.nio.NioEventLoopGroup; +import io.netty.channel.socket.DatagramChannel; import io.netty.channel.socket.nio.NioDatagramChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.dns.DefaultDnsQuestion; @@ -38,8 +42,16 @@ import io.netty.incubator.channel.uring.IOUringSocketChannel; import io.netty.resolver.dns.DnsNameResolver; import io.netty.resolver.dns.DnsNameResolverBuilder; import io.netty.util.concurrent.DefaultThreadFactory; +import org.geysermc.mcprotocollib.network.BuiltinFlags; +import org.geysermc.mcprotocollib.network.ProxyInfo; +import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; +import org.geysermc.mcprotocollib.network.helper.TransportHelper; +import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import java.net.*; +import java.net.Inet4Address; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.UnknownHostException; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; @@ -82,7 +94,7 @@ public class TcpClientSession extends TcpSession { @Override public void connect(boolean wait, boolean transferring) { - if(this.disconnected) { + if (this.disconnected) { throw new IllegalStateException("Session has already been disconnected."); } @@ -144,7 +156,7 @@ public class TcpClientSession extends TcpSession { exceptionCaught(null, futureListener.cause()); } }); - } catch(Throwable t) { + } catch (Throwable t) { exceptionCaught(null, t); } } @@ -162,7 +174,7 @@ public class TcpClientSession extends TcpSession { System.out.println("[PacketLib] Attempting SRV lookup for \"" + name + "\"."); } - if(getFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, true) && (!this.host.matches(IP_REGEX) && !this.host.equalsIgnoreCase("localhost"))) { + if (getFlag(BuiltinFlags.ATTEMPT_SRV_RESOLVE, true) && (!this.host.matches(IP_REGEX) && !this.host.equalsIgnoreCase("localhost"))) { AddressedEnvelope envelope = null; try (DnsNameResolver resolver = new DnsNameResolverBuilder(EVENT_LOOP_GROUP.next()) .channelType(DATAGRAM_CHANNEL_CLASS) @@ -205,7 +217,7 @@ public class TcpClientSession extends TcpSession { } } - } else if(debug) { + } else if (debug) { System.out.println("[PacketLib] Not resolving SRV record for " + this.host); } @@ -226,7 +238,7 @@ public class TcpClientSession extends TcpSession { } private void addProxy(ChannelPipeline pipeline) { - if(proxy != null) { + if (proxy != null) { switch (proxy.getType()) { case HTTP -> { if (proxy.isAuthenticated()) { @@ -310,16 +322,16 @@ public class TcpClientSession extends TcpSession { } Runtime.getRuntime().addShutdownHook(new Thread( - () -> EVENT_LOOP_GROUP.shutdownGracefully(SHUTDOWN_QUIET_PERIOD_MS, SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS))); + () -> EVENT_LOOP_GROUP.shutdownGracefully(SHUTDOWN_QUIET_PERIOD_MS, SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS))); } protected static ThreadFactory newThreadFactory() { - // Create a new daemon thread. When the last non daemon thread ends - // the runtime environment will call the shutdown hooks. One of the - // hooks will try to shut down the event loop group which will - // normally lead to the thread exiting. If not, it will be forcibly - // killed after SHUTDOWN_TIMEOUT_MS along with the other - // daemon threads as the runtime exits. - return new DefaultThreadFactory(TcpClientSession.class, true); + // Create a new daemon thread. When the last non daemon thread ends + // the runtime environment will call the shutdown hooks. One of the + // hooks will try to shut down the event loop group which will + // normally lead to the thread exiting. If not, it will be forcibly + // killed after SHUTDOWN_TIMEOUT_MS along with the other + // daemon threads as the runtime exits. + return new DefaultThreadFactory(TcpClientSession.class, true); } } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCodec.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCodec.java index bb571811..076dde5a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCodec.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCodec.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.network.tcp; +import io.netty.buffer.ByteBuf; +import io.netty.channel.ChannelHandlerContext; +import io.netty.handler.codec.ByteToMessageCodec; import org.geysermc.mcprotocollib.network.Session; import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; import org.geysermc.mcprotocollib.network.codec.PacketDefinition; import org.geysermc.mcprotocollib.network.event.session.PacketErrorEvent; import org.geysermc.mcprotocollib.network.packet.Packet; import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import io.netty.buffer.ByteBuf; -import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.ByteToMessageCodec; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCompression.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCompression.java index 8af73f98..1b738b43 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCompression.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketCompression.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.Session; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageCodec; import io.netty.handler.codec.DecoderException; import io.netty.handler.codec.EncoderException; +import org.geysermc.mcprotocollib.network.Session; import java.util.List; import java.util.zip.Deflater; @@ -40,7 +40,7 @@ public class TcpPacketCompression extends ByteToMessageCodec { if (readable > MAX_UNCOMPRESSED_SIZE) { throw new EncoderException("Packet too big: size of " + readable + " is larger than the protocol maximum of " + MAX_UNCOMPRESSED_SIZE + "."); } - if(readable < this.session.getCompressionThreshold()) { + if (readable < this.session.getCompressionThreshold()) { this.session.getCodecHelper().writeVarInt(out, 0); out.writeBytes(in); } else { @@ -49,7 +49,7 @@ public class TcpPacketCompression extends ByteToMessageCodec { this.session.getCodecHelper().writeVarInt(out, bytes.length); this.deflater.setInput(bytes, 0, readable); this.deflater.finish(); - while(!this.deflater.finished()) { + while (!this.deflater.finished()) { int length = this.deflater.deflate(this.buf); out.writeBytes(this.buf, 0, length); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketEncryptor.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketEncryptor.java index 09088711..c743113f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketEncryptor.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketEncryptor.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.crypt.PacketEncryption; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageCodec; +import org.geysermc.mcprotocollib.network.crypt.PacketEncryption; import java.util.List; @@ -21,7 +21,7 @@ public class TcpPacketEncryptor extends ByteToMessageCodec { int length = in.readableBytes(); byte[] bytes = this.getBytes(in); int outLength = this.encryption.getEncryptOutputSize(length); - if( this.encryptedArray.length < outLength) { + if (this.encryptedArray.length < outLength) { this.encryptedArray = new byte[outLength]; } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketSizer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketSizer.java index 4480aa19..f6d5e9b7 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketSizer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpPacketSizer.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.Session; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageCodec; import io.netty.handler.codec.CorruptedFrameException; +import org.geysermc.mcprotocollib.network.Session; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java index 3dcef301..f6ab2f8a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServer.java @@ -1,13 +1,16 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.AbstractServer; -import org.geysermc.mcprotocollib.network.BuiltinFlags; -import org.geysermc.mcprotocollib.network.helper.TransportHelper; -import org.geysermc.mcprotocollib.network.packet.PacketProtocol; import io.netty.bootstrap.ServerBootstrap; +import io.netty.channel.Channel; +import io.netty.channel.ChannelException; +import io.netty.channel.ChannelFuture; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelInitializer; +import io.netty.channel.ChannelOption; +import io.netty.channel.ChannelPipeline; +import io.netty.channel.EventLoopGroup; import io.netty.channel.epoll.EpollEventLoopGroup; import io.netty.channel.epoll.EpollServerSocketChannel; -import io.netty.channel.*; import io.netty.channel.kqueue.KQueueEventLoopGroup; import io.netty.channel.kqueue.KQueueServerSocketChannel; import io.netty.channel.nio.NioEventLoopGroup; @@ -16,6 +19,10 @@ import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.incubator.channel.uring.IOUringEventLoopGroup; import io.netty.incubator.channel.uring.IOUringServerSocketChannel; import io.netty.util.concurrent.Future; +import org.geysermc.mcprotocollib.network.AbstractServer; +import org.geysermc.mcprotocollib.network.BuiltinFlags; +import org.geysermc.mcprotocollib.network.helper.TransportHelper; +import org.geysermc.mcprotocollib.network.packet.PacketProtocol; import java.net.InetSocketAddress; import java.util.function.Supplier; @@ -36,7 +43,7 @@ public class TcpServer extends AbstractServer { @Override public void bindImpl(boolean wait, final Runnable callback) { - if(this.group != null || this.channel != null) { + if (this.group != null || this.channel != null) { return; } @@ -89,26 +96,26 @@ public class TcpServer extends AbstractServer { } }).group(this.group).localAddress(this.getHost(), this.getPort()).bind(); - if(wait) { + if (wait) { try { future.sync(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { } channel = future.channel(); - if(callback != null) { + if (callback != null) { callback.run(); } } else { future.addListener((ChannelFutureListener) future1 -> { - if(future1.isSuccess()) { + if (future1.isSuccess()) { channel = future1.channel(); - if(callback != null) { + if (callback != null) { callback.run(); } } else { System.err.println("[ERROR] Failed to asynchronously bind connection listener."); - if(future1.cause() != null) { + if (future1.cause() != null) { future1.cause().printStackTrace(); } } @@ -118,27 +125,27 @@ public class TcpServer extends AbstractServer { @Override public void closeImpl(boolean wait, final Runnable callback) { - if(this.channel != null) { - if(this.channel.isOpen()) { + if (this.channel != null) { + if (this.channel.isOpen()) { ChannelFuture future = this.channel.close(); - if(wait) { + if (wait) { try { future.sync(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { } - if(callback != null) { + if (callback != null) { callback.run(); } } else { future.addListener((ChannelFutureListener) future1 -> { - if(future1.isSuccess()) { - if(callback != null) { + if (future1.isSuccess()) { + if (callback != null) { callback.run(); } } else { System.err.println("[ERROR] Failed to asynchronously close connection listener."); - if(future1.cause() != null) { + if (future1.cause() != null) { future1.cause().printStackTrace(); } } @@ -149,18 +156,18 @@ public class TcpServer extends AbstractServer { this.channel = null; } - if(this.group != null) { + if (this.group != null) { Future future = this.group.shutdownGracefully(); - if(wait) { + if (wait) { try { future.sync(); - } catch(InterruptedException e) { + } catch (InterruptedException e) { } } else { future.addListener(future1 -> { - if(!future1.isSuccess() && getGlobalFlag(BuiltinFlags.PRINT_DEBUG, false)) { + if (!future1.isSuccess() && getGlobalFlag(BuiltinFlags.PRINT_DEBUG, false)) { System.err.println("[ERROR] Failed to asynchronously close connection listener."); - if(future1.cause() != null) { + if (future1.cause() != null) { future1.cause().printStackTrace(); } } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServerSession.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServerSession.java index d61c216b..f8477930 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServerSession.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpServerSession.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.network.tcp; -import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; -import org.geysermc.mcprotocollib.network.packet.PacketProtocol; import io.netty.channel.ChannelHandlerContext; import org.geysermc.mcprotocollib.network.Flag; +import org.geysermc.mcprotocollib.network.codec.PacketCodecHelper; +import org.geysermc.mcprotocollib.network.packet.PacketProtocol; import java.util.HashMap; import java.util.Map; @@ -33,7 +33,7 @@ public class TcpServerSession extends TcpSession { @Override public boolean hasFlag(Flag flag) { - if(super.hasFlag(flag)) { + if (super.hasFlag(flag)) { return true; } @@ -43,7 +43,7 @@ public class TcpServerSession extends TcpSession { @Override public T getFlag(Flag flag, T def) { T ret = super.getFlag(flag, null); - if(ret != null) { + if (ret != null) { return ret; } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java index b7e37a6e..f3a70e72 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/network/tcp/TcpSession.java @@ -1,5 +1,21 @@ package org.geysermc.mcprotocollib.network.tcp; +import io.netty.channel.Channel; +import io.netty.channel.ChannelFutureListener; +import io.netty.channel.ChannelHandlerContext; +import io.netty.channel.ConnectTimeoutException; +import io.netty.channel.DefaultEventLoopGroup; +import io.netty.channel.EventLoop; +import io.netty.channel.EventLoopGroup; +import io.netty.channel.SimpleChannelInboundHandler; +import io.netty.handler.timeout.ReadTimeoutException; +import io.netty.handler.timeout.ReadTimeoutHandler; +import io.netty.handler.timeout.WriteTimeoutException; +import io.netty.handler.timeout.WriteTimeoutHandler; +import io.netty.util.concurrent.DefaultThreadFactory; +import net.kyori.adventure.text.Component; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.network.Flag; import org.geysermc.mcprotocollib.network.Session; import org.geysermc.mcprotocollib.network.crypt.PacketEncryption; import org.geysermc.mcprotocollib.network.event.session.ConnectedEvent; @@ -10,15 +26,6 @@ import org.geysermc.mcprotocollib.network.event.session.SessionEvent; import org.geysermc.mcprotocollib.network.event.session.SessionListener; import org.geysermc.mcprotocollib.network.packet.Packet; import org.geysermc.mcprotocollib.network.packet.PacketProtocol; -import io.netty.channel.*; -import io.netty.handler.timeout.ReadTimeoutException; -import io.netty.handler.timeout.ReadTimeoutHandler; -import io.netty.handler.timeout.WriteTimeoutException; -import io.netty.handler.timeout.WriteTimeoutHandler; -import io.netty.util.concurrent.DefaultThreadFactory; -import net.kyori.adventure.text.Component; -import org.checkerframework.checker.nullness.qual.Nullable; -import org.geysermc.mcprotocollib.network.Flag; import java.net.ConnectException; import java.net.SocketAddress; @@ -252,7 +259,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler imp @Override public void send(Packet packet) { - if(this.channel == null) { + if (this.channel == null) { return; } @@ -262,7 +269,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler imp if (!sendingEvent.isCancelled()) { final Packet toSend = sendingEvent.getPacket(); this.channel.writeAndFlush(toSend).addListener((ChannelFutureListener) future -> { - if(future.isSuccess()) { + if (future.isSuccess()) { callPacketSent(toSend); } else { exceptionCaught(null, future.cause()); @@ -314,7 +321,7 @@ public abstract class TcpSession extends SimpleChannelInboundHandler imp // daemon threads and their interaction with the runtime. PACKET_EVENT_LOOP = new DefaultEventLoopGroup(new DefaultThreadFactory(this.getClass(), true)); Runtime.getRuntime().addShutdownHook(new Thread( - () -> PACKET_EVENT_LOOP.shutdownGracefully(SHUTDOWN_QUIET_PERIOD_MS, SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS))); + () -> PACKET_EVENT_LOOP.shutdownGracefully(SHUTDOWN_QUIET_PERIOD_MS, SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS))); } return PACKET_EVENT_LOOP.next(); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java index cbb0264f..3a319bcd 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/MinecraftProtocol.java @@ -103,7 +103,7 @@ public class MinecraftProtocol extends PacketProtocol { /** * Constructs a new MinecraftProtocol instance for logging in using offline mode. * - * @param codec The packet codec to use. + * @param codec The packet codec to use. * @param username Username to use. */ public MinecraftProtocol(@NonNull PacketCodec codec, @NonNull String username) { @@ -113,7 +113,7 @@ public class MinecraftProtocol extends PacketProtocol { /** * Constructs a new MinecraftProtocol instance for logging in. * - * @param profile GameProfile to use. + * @param profile GameProfile to use. * @param accessToken Access token to use, or null if using offline mode. */ public MinecraftProtocol(@NonNull GameProfile profile, String accessToken) { @@ -123,8 +123,8 @@ public class MinecraftProtocol extends PacketProtocol { /** * Constructs a new MinecraftProtocol instance for logging in. * - * @param codec The packet codec to use. - * @param profile GameProfile to use. + * @param codec The packet codec to use. + * @param profile GameProfile to use. * @param accessToken Access token to use, or null if using offline mode. */ public MinecraftProtocol(@NonNull PacketCodec codec, @NonNull GameProfile profile, String accessToken) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java index 8cf99163..3bfc804f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/ServerListener.java @@ -103,7 +103,8 @@ public class ServerListener extends SessionAdapter { session.disconnect("Outdated client! Please use " + protocol.getCodec().getMinecraftVersion() + "."); } } - default -> throw new UnsupportedOperationException("Invalid client intent: " + intentionPacket.getIntent()); + default -> + throw new UnsupportedOperationException("Invalid client intent: " + intentionPacket.getIntent()); } } } else if (protocol.getState() == ProtocolState.LOGIN) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java index ce767cf9..7cba4d7a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftCodecHelper.java @@ -1,9 +1,23 @@ package org.geysermc.mcprotocollib.protocol.codec; import com.github.steveice10.mc.auth.data.GameProfile; +import com.google.gson.JsonElement; +import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufInputStream; import io.netty.buffer.ByteBufOutputStream; -import org.cloudburstmc.nbt.*; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import lombok.RequiredArgsConstructor; +import net.kyori.adventure.text.Component; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.cloudburstmc.math.vector.Vector3f; +import org.cloudburstmc.math.vector.Vector3i; +import org.cloudburstmc.math.vector.Vector4f; +import org.cloudburstmc.nbt.NBTInputStream; +import org.cloudburstmc.nbt.NBTOutputStream; +import org.cloudburstmc.nbt.NbtMap; +import org.cloudburstmc.nbt.NbtType; +import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper; import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; import org.geysermc.mcprotocollib.protocol.data.game.Holder; import org.geysermc.mcprotocollib.protocol.data.game.Identifier; @@ -27,10 +41,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOp import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.ArmadilloState; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Pose; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.SnifferState; @@ -40,6 +50,10 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.player.BlockBreakSta import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PlayerSpawnInfo; import org.geysermc.mcprotocollib.protocol.data.game.entity.type.PaintingType; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.level.LightUpdateData; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @@ -68,29 +82,23 @@ import org.geysermc.mcprotocollib.protocol.data.game.level.sound.SoundCategory; import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import org.geysermc.mcprotocollib.protocol.data.game.statistic.StatisticCategory; import org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundLoginPacket; -import org.geysermc.mcprotocollib.network.codec.BasePacketCodecHelper; -import com.google.gson.JsonElement; -import io.netty.buffer.ByteBuf; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import lombok.RequiredArgsConstructor; -import net.kyori.adventure.text.Component; -import org.checkerframework.checker.nullness.qual.NonNull; -import org.cloudburstmc.math.vector.Vector3f; -import org.cloudburstmc.math.vector.Vector3i; -import org.cloudburstmc.math.vector.Vector4f; -import org.checkerframework.checker.nullness.qual.Nullable; import org.jetbrains.annotations.NotNull; -import java.io.*; -import java.util.*; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.BitSet; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; import java.util.function.BiConsumer; import java.util.function.Function; import java.util.function.IntFunction; import java.util.function.ObjIntConsumer; import java.util.function.ToIntFunction; -import static org.cloudburstmc.nbt.NbtType.byClass; - @RequiredArgsConstructor public class MinecraftCodecHelper extends BasePacketCodecHelper { private static final int POSITION_X_SIZE = 38; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftPacketSerializer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftPacketSerializer.java index 92392641..f4efec9d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftPacketSerializer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/MinecraftPacketSerializer.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.codec; -import org.geysermc.mcprotocollib.network.codec.PacketDefinition; -import org.geysermc.mcprotocollib.network.codec.PacketSerializer; import io.netty.buffer.ByteBuf; import lombok.RequiredArgsConstructor; +import org.geysermc.mcprotocollib.network.codec.PacketDefinition; +import org.geysermc.mcprotocollib.network.codec.PacketSerializer; @RequiredArgsConstructor public class MinecraftPacketSerializer implements PacketSerializer { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/NbtComponentSerializer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/NbtComponentSerializer.java index 621b9a36..a7867ad6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/NbtComponentSerializer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/NbtComponentSerializer.java @@ -14,7 +14,6 @@ import org.cloudburstmc.nbt.NbtType; import org.jetbrains.annotations.Contract; import java.util.Arrays; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -26,21 +25,21 @@ import java.util.UUID; public class NbtComponentSerializer { private static final Set BOOLEAN_TYPES = Set.of( - "interpret", - "bold", - "italic", - "underlined", - "strikethrough", - "obfuscated" + "interpret", + "bold", + "italic", + "underlined", + "strikethrough", + "obfuscated" ); // Order is important private static final List> COMPONENT_TYPES = List.of( - new Pair<>("text", "text"), - new Pair<>("translatable", "translate"), - new Pair<>("score", "score"), - new Pair<>("selector", "selector"), - new Pair<>("keybind", "keybind"), - new Pair<>("nbt", "nbt") + new Pair<>("text", "text"), + new Pair<>("translatable", "translate"), + new Pair<>("score", "score"), + new Pair<>("selector", "selector"), + new Pair<>("keybind", "keybind"), + new Pair<>("nbt", "nbt") ); private NbtComponentSerializer() { @@ -161,9 +160,9 @@ public class NbtComponentSerializer { /** * Converts a json object entry to a tag entry. * - * @param key key of the entry + * @param key key of the entry * @param value value of the entry - * @param tag the resulting compound tag + * @param tag the resulting compound tag */ private static void convertObjectEntry(final String key, final JsonElement value, final NbtMapBuilder tag) { if ((key.equals("contents")) && value.isJsonObject()) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketCodec.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketCodec.java index e7082664..0f1446f5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketCodec.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketCodec.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.codec; -import org.geysermc.mcprotocollib.protocol.data.ProtocolState; import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; +import org.geysermc.mcprotocollib.protocol.data.ProtocolState; import java.util.EnumMap; import java.util.function.Supplier; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketFactory.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketFactory.java index 2dd6f6ed..7cc5c479 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketFactory.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/codec/PacketFactory.java @@ -15,7 +15,7 @@ public interface PacketFactory { /** * Constructs a new {@link Packet}. * - * @param buf the input buffer + * @param buf the input buffer * @param codecHelper the codec helper * @return a new packet from the input */ diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/PlayerListEntry.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/PlayerListEntry.java index 138f10d1..7c330dcb 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/PlayerListEntry.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/PlayerListEntry.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game; import com.github.steveice10.mc.auth.data.GameProfile; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; import java.security.PublicKey; import java.util.UUID; @@ -23,7 +23,7 @@ public class PlayerListEntry { private UUID sessionId; private long expiresAt; private @Nullable PublicKey publicKey; - private byte @Nullable[] keySignature; + private byte @Nullable [] keySignature; public PlayerListEntry(UUID profileId) { this(profileId, null, false, 0, GameMode.SURVIVAL, null, null, 0, null, null); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/advancement/Advancement.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/advancement/Advancement.java index 53e18085..1a105b90 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/advancement/Advancement.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/advancement/Advancement.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.advancement; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/MessageSignature.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/MessageSignature.java index cb690e80..3168c92b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/MessageSignature.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chat/MessageSignature.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.data.game.chat; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; @Data @AllArgsConstructor public class MessageSignature { private final int id; - private final byte @Nullable[] messageSignature; + private final byte @Nullable [] messageSignature; public static MessageSignature read(ByteBuf in, MinecraftCodecHelper helper) { int id = helper.readVarInt(in) - 1; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/BitStorage.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/BitStorage.java index 7cc7b4c4..9f4cd833 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/BitStorage.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/BitStorage.java @@ -1,6 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.chunk; -import lombok.*; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; import java.util.Arrays; @@ -32,7 +36,7 @@ public class BitStorage { }; @Getter - private final long @NonNull[] data; + private final long @NonNull [] data; @Getter private final int bitsPerEntry; @Getter @@ -48,7 +52,7 @@ public class BitStorage { this(bitsPerEntry, size, null); } - public BitStorage(int bitsPerEntry, int size, long @Nullable[] data) { + public BitStorage(int bitsPerEntry, int size, long @Nullable [] data) { if (bitsPerEntry < 1 || bitsPerEntry > 32) { throw new IllegalArgumentException("bitsPerEntry must be between 1 and 32, inclusive."); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/ChunkSection.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/ChunkSection.java index d1d449b6..e1d7eeea 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/ChunkSection.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/ChunkSection.java @@ -1,6 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game.chunk; -import lombok.*; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; +import lombok.Setter; @Data @Setter(AccessLevel.NONE) diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/DataPalette.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/DataPalette.java index e12b90be..92dc1f86 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/DataPalette.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/DataPalette.java @@ -1,7 +1,17 @@ package org.geysermc.mcprotocollib.protocol.data.game.chunk; -import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.*; -import lombok.*; +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NonNull; +import lombok.Setter; +import lombok.ToString; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.GlobalPalette; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.ListPalette; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.MapPalette; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.Palette; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.PaletteType; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.SingletonPalette; @Getter @Setter diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/ListPalette.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/ListPalette.java index 663362b9..8c295824 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/ListPalette.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/ListPalette.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.chunk.palette; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import io.netty.buffer.ByteBuf; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import java.util.Arrays; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/MapPalette.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/MapPalette.java index 41d0cdb7..1a6472c5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/MapPalette.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/MapPalette.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game.chunk.palette; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import io.netty.buffer.ByteBuf; import it.unimi.dsi.fastutil.ints.Int2IntMap; import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import java.util.Arrays; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/Palette.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/Palette.java index 339dfa1f..c7e59d8f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/Palette.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/chunk/palette/Palette.java @@ -32,6 +32,7 @@ public interface Palette { /** * Creates a copy of this palette. * This performs a deep copy of the palette's internal data. + * * @return The palette's copy. */ Palette copy(); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/CommandNode.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/CommandNode.java index eebd56f9..f36a555c 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/CommandNode.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/CommandNode.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.command; -import org.geysermc.mcprotocollib.protocol.data.game.command.properties.CommandProperties; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.command.properties.CommandProperties; import java.util.OptionalInt; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/SuggestionType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/SuggestionType.java index 40512ecb..9a6ec9af 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/SuggestionType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/SuggestionType.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.command; -import org.geysermc.mcprotocollib.protocol.data.game.Identifier; import org.checkerframework.checker.nullness.qual.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.Identifier; import java.util.HashMap; import java.util.Locale; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/properties/ResourceProperties.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/properties/ResourceProperties.java index 670ea551..75ffaefa 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/properties/ResourceProperties.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/command/properties/ResourceProperties.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.command.properties; -import org.geysermc.mcprotocollib.protocol.data.game.Identifier; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.Identifier; @Data public class ResourceProperties implements CommandProperties { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/attribute/AttributeType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/attribute/AttributeType.java index cb17b2d3..d735809d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/attribute/AttributeType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/attribute/AttributeType.java @@ -3,12 +3,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.attribute; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import lombok.AllArgsConstructor; -import lombok.EqualsAndHashCode; import lombok.Getter; -import java.util.HashMap; -import java.util.Map; - public interface AttributeType { String getIdentifier(); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/BooleanMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/BooleanMetadataType.java index 72361598..13b574a7 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/BooleanMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/BooleanMetadataType.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata; -import io.netty.buffer.ByteBuf; public class BooleanMetadataType extends MetadataType { private final BooleanReader primitiveReader; @@ -23,7 +23,7 @@ public class BooleanMetadataType extends MetadataType { } public void writeMetadataPrimitive(ByteBuf output, boolean value) { - this.primitiveWriter.writePrimitive(output, value); + this.primitiveWriter.writePrimitive(output, value); } @FunctionalInterface diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/ByteMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/ByteMetadataType.java index abdc3cbd..c4a057cf 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/ByteMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/ByteMetadataType.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ByteEntityMetadata; -import io.netty.buffer.ByteBuf; public class ByteMetadataType extends MetadataType { private final ByteReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/EntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/EntityMetadata.java index 06b2df1e..ed771dd1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/EntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/EntityMetadata.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ObjectEntityMetadata; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.ObjectEntityMetadata; import java.util.Objects; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/Equipment.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/Equipment.java index 96504a1f..773f0939 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/Equipment.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/Equipment.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; -import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/FloatMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/FloatMetadataType.java index 2a5c60fb..b76bf1a2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/FloatMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/FloatMetadataType.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.FloatEntityMetadata; -import io.netty.buffer.ByteBuf; public class FloatMetadataType extends MetadataType { private final FloatReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/IntMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/IntMetadataType.java index cd7ce92a..8213f5db 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/IntMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/IntMetadataType.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.IntEntityMetadata; -import io.netty.buffer.ByteBuf; public class IntMetadataType extends MetadataType { private final IntReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/LongMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/LongMetadataType.java index fc0f6bdf..b91dd073 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/LongMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/LongMetadataType.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.LongEntityMetadata; -import io.netty.buffer.ByteBuf; public class LongMetadataType extends MetadataType { private final LongReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/MetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/MetadataType.java index 0ee34756..1501714c 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/MetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/MetadataType.java @@ -1,5 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; +import io.netty.buffer.ByteBuf; +import lombok.Getter; +import net.kyori.adventure.text.Component; +import org.cloudburstmc.math.vector.Vector3f; +import org.cloudburstmc.math.vector.Vector3i; +import org.cloudburstmc.math.vector.Vector4f; import org.cloudburstmc.nbt.NbtMap; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type.BooleanEntityMetadata; @@ -12,12 +18,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import org.geysermc.mcprotocollib.protocol.data.game.entity.type.PaintingType; import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle; -import io.netty.buffer.ByteBuf; -import lombok.Getter; -import net.kyori.adventure.text.Component; -import org.cloudburstmc.math.vector.Vector3f; -import org.cloudburstmc.math.vector.Vector3i; -import org.cloudburstmc.math.vector.Vector4f; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/OptionalIntMetadataType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/OptionalIntMetadataType.java index 7fb401b8..30095573 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/OptionalIntMetadataType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/OptionalIntMetadataType.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import java.util.OptionalInt; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/BooleanEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/BooleanEntityMetadata.java index b2b028f0..88230b89 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/BooleanEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/BooleanEntityMetadata.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.BooleanMetadataType; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class BooleanEntityMetadata extends EntityMetadata { private final boolean value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ByteEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ByteEntityMetadata.java index 71ef147d..4f62cb14 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ByteEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ByteEntityMetadata.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.ByteMetadataType; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class ByteEntityMetadata extends EntityMetadata { private final byte value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/FloatEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/FloatEntityMetadata.java index 675a904c..ebdb27b4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/FloatEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/FloatEntityMetadata.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.FloatMetadataType; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class FloatEntityMetadata extends EntityMetadata { private final float value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/IntEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/IntEntityMetadata.java index 89168ef9..8f6347cd 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/IntEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/IntEntityMetadata.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.IntMetadataType; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class IntEntityMetadata extends EntityMetadata { private final int value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/LongEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/LongEntityMetadata.java index b24da991..c4d96c92 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/LongEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/LongEntityMetadata.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.LongMetadataType; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class LongEntityMetadata extends EntityMetadata { private final long value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ObjectEntityMetadata.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ObjectEntityMetadata.java index 5943903e..9712cd86 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ObjectEntityMetadata.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/metadata/type/ObjectEntityMetadata.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.type; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.MetadataType; -import lombok.NonNull; public class ObjectEntityMetadata extends EntityMetadata> { private final T value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/GameMode.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/GameMode.java index b1ce73a8..8ae057d5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/GameMode.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/GameMode.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.player; -import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue; public enum GameMode implements GameEventValue { SURVIVAL, diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/PlayerSpawnInfo.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/PlayerSpawnInfo.java index 0b0924d8..ed7f076f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/PlayerSpawnInfo.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/entity/player/PlayerSpawnInfo.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.entity.player; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/VillagerTrade.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/VillagerTrade.java index 1f6286c7..3c9c1366 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/VillagerTrade.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/VillagerTrade.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.inventory; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/property/EnchantmentTableProperty.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/property/EnchantmentTableProperty.java index 5f308d5e..fa776201 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/property/EnchantmentTableProperty.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/inventory/property/EnchantmentTableProperty.java @@ -54,7 +54,7 @@ public enum EnchantmentTableProperty implements ContainerProperty { /** * Packs enchantment type and level into one integer as used for the ENCHANTMENT_SLOT_X properties. * - * @param type Id of the enchantment + * @param type Id of the enchantment * @param level Level of the enchantment * @return Packed value * @see #getEnchantmentType(int) diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/ItemStack.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/ItemStack.java index 17bfdd68..ca05073b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/ItemStack.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/ItemStack.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.item; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; import lombok.AllArgsConstructor; import lombok.Data; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponents; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/AdventureModePredicate.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/AdventureModePredicate.java index 4e14b4b2..4b066693 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/AdventureModePredicate.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/AdventureModePredicate.java @@ -17,7 +17,7 @@ public class AdventureModePredicate { @AllArgsConstructor public static class BlockPredicate { private final @Nullable String location; - private final int @Nullable[] holders; + private final int @Nullable [] holders; private final @Nullable List properties; private final @Nullable NbtMap nbt; } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ArmorTrim.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ArmorTrim.java index 3c24027d..285f5ea5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ArmorTrim.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ArmorTrim.java @@ -1,10 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.Holder; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import lombok.AllArgsConstructor; -import lombok.Data; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.data.game.Holder; public record ArmorTrim(Holder material, Holder pattern, boolean showInTooltip) { public record TrimMaterial(String assetName, int ingredientId, float itemModelIndex, diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BannerPatternLayer.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BannerPatternLayer.java index 623f0ed2..e16a50eb 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BannerPatternLayer.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BannerPatternLayer.java @@ -1,9 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.Holder; import lombok.AllArgsConstructor; import lombok.Data; -import org.jetbrains.annotations.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.Holder; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BooleanComponentType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BooleanComponentType.java index 498535f0..f10e2f4e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BooleanComponentType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/BooleanComponentType.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent; public class BooleanComponentType extends DataComponentType { protected final BooleanReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponent.java index f59dc034..54a7745d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponent.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent; import java.util.Objects; @@ -36,7 +36,7 @@ public abstract class DataComponent> { if (this == o) { return true; } - if (!(o instanceof DataComponent)) { + if (!(o instanceof DataComponent)) { return false; } DataComponent that = (DataComponent) o; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponentType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponentType.java index 28d5471f..24453b95 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponentType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/DataComponentType.java @@ -1,6 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; import com.github.steveice10.mc.auth.data.GameProfile; +import io.netty.buffer.ByteBuf; +import lombok.Getter; +import net.kyori.adventure.text.Component; import org.cloudburstmc.nbt.NbtList; import org.cloudburstmc.nbt.NbtMap; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; @@ -9,9 +12,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.BooleanDataComponent; import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent; import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.ObjectDataComponent; -import io.netty.buffer.ByteBuf; -import lombok.Getter; -import net.kyori.adventure.text.Component; import java.util.ArrayList; import java.util.List; @@ -162,7 +162,8 @@ public class DataComponentType { } private static Writer unitWriter() { - return (helper, output, value) -> {}; + return (helper, output, value) -> { + }; } public static DataComponentType read(ByteBuf in, MinecraftCodecHelper helper) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/Instrument.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/Instrument.java index 19bac8be..2e7e2e92 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/Instrument.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/Instrument.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/IntComponentType.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/IntComponentType.java index 66c4173c..63e4cb4f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/IntComponentType.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/IntComponentType.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent; import io.netty.buffer.ByteBuf; +import org.geysermc.mcprotocollib.protocol.data.game.item.component.type.IntDataComponent; public class IntComponentType extends DataComponentType { protected final IntReader primitiveReader; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemAttributeModifiers.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemAttributeModifiers.java index 5d40aadf..3189c630 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemAttributeModifiers.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemAttributeModifiers.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOperation; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOperation; import java.util.List; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemCodecHelper.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemCodecHelper.java index 4919bd17..1b61fccc 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemCodecHelper.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ItemCodecHelper.java @@ -1,6 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; import com.github.steveice10.mc.auth.data.GameProfile; +import io.netty.buffer.ByteBuf; +import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; +import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; +import net.kyori.adventure.text.Component; import org.cloudburstmc.nbt.NbtList; import org.cloudburstmc.nbt.NbtType; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; @@ -9,11 +14,6 @@ import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.ModifierOp import org.geysermc.mcprotocollib.protocol.data.game.level.sound.BuiltinSound; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.CustomSound; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; -import io.netty.buffer.ByteBuf; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; -import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import net.kyori.adventure.text.Component; import java.util.ArrayList; import java.util.Collections; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/LodestoneTracker.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/LodestoneTracker.java index 69b2611c..e8d78bb2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/LodestoneTracker.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/LodestoneTracker.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.GlobalPos; import org.jetbrains.annotations.Nullable; @Data diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ToolData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ToolData.java index bd1bb9d1..93891af3 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ToolData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/ToolData.java @@ -17,7 +17,7 @@ public class ToolData { @AllArgsConstructor public static class Rule { private final @Nullable String location; - private final int @Nullable[] holders; + private final int @Nullable [] holders; private final @Nullable Float speed; private final @Nullable Boolean correctForDrops; } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/BooleanDataComponent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/BooleanDataComponent.java index 80fcd10f..491e6a37 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/BooleanDataComponent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/BooleanDataComponent.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.data.game.item.component.BooleanComponentType; import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class BooleanDataComponent extends DataComponent { private final Boolean value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/IntDataComponent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/IntDataComponent.java index 77c011bf..eedd1a7a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/IntDataComponent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/IntDataComponent.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component.type; +import io.netty.buffer.ByteBuf; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; import org.geysermc.mcprotocollib.protocol.data.game.item.component.IntComponentType; import org.geysermc.mcprotocollib.protocol.data.game.item.component.ItemCodecHelper; -import io.netty.buffer.ByteBuf; -import lombok.NonNull; public class IntDataComponent extends DataComponent { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/ObjectDataComponent.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/ObjectDataComponent.java index 94a5b128..b9533abf 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/ObjectDataComponent.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/item/component/type/ObjectDataComponent.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.item.component.type; +import lombok.NonNull; import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponent; import org.geysermc.mcprotocollib.protocol.data.game.item.component.DataComponentType; -import lombok.NonNull; public class ObjectDataComponent extends DataComponent> { private final T value; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/LightUpdateData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/LightUpdateData.java index 7092786e..0b5e75d6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/LightUpdateData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/LightUpdateData.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import java.util.ArrayList; import java.util.BitSet; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/BellValue.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/BellValue.java index 212cd644..af223443 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/BellValue.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/BellValue.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.block.value; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/DecoratedPotValue.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/DecoratedPotValue.java index 06292cf9..dd8f8e40 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/DecoratedPotValue.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/DecoratedPotValue.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.block.value; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/PistonValue.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/PistonValue.java index 5d12e4a1..37a4a1b2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/PistonValue.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/block/value/PistonValue.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.block.value; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/ElectricSparkData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/ElectricSparkData.java index 6ef33bf6..d896b6d4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/ElectricSparkData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/ElectricSparkData.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.event; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SculkBlockChargeEventData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SculkBlockChargeEventData.java index ca2aadec..0ca86189 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SculkBlockChargeEventData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SculkBlockChargeEventData.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.event; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import lombok.Value; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import java.util.EnumSet; import java.util.Set; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SmokeEventData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SmokeEventData.java index 37f644fc..4c0634ce 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SmokeEventData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/event/SmokeEventData.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.event; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/ItemParticleData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/ItemParticleData.java index ec153f07..2fd14093 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/ItemParticleData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/ItemParticleData.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.particle; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import lombok.AllArgsConstructor; import lombok.Data; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/VibrationParticleData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/VibrationParticleData.java index 589e0c50..ad083048 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/VibrationParticleData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/level/particle/VibrationParticleData.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.level.particle; -import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.PositionSource; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.level.particle.positionsource.PositionSource; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Ingredient.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Ingredient.java index dd53dfe5..8a7fe2c2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Ingredient.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Ingredient.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Recipe.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Recipe.java index e80f3960..378547f0 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Recipe.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/Recipe.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.data.RecipeData; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.data.RecipeData; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/CookedRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/CookedRecipeData.java index 823c52fe..5c4d9599 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/CookedRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/CookedRecipeData.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapedRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapedRecipeData.java index 522d3a10..6fc09aa4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapedRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapedRecipeData.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapelessRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapelessRecipeData.java index ea5da286..a15057ca 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapelessRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/ShapelessRecipeData.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SimpleCraftingRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SimpleCraftingRecipeData.java index 21748f9d..40eb77f8 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SimpleCraftingRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SimpleCraftingRecipeData.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.CraftingBookCategory; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTransformRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTransformRecipeData.java index 99298bb6..05da2e2f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTransformRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTransformRecipeData.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTrimRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTrimRecipeData.java index 7f381543..2aa698db 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTrimRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/SmithingTrimRecipeData.java @@ -1,9 +1,9 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/StoneCuttingRecipeData.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/StoneCuttingRecipeData.java index 6e5075a8..444e29e3 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/StoneCuttingRecipeData.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/recipe/data/StoneCuttingRecipeData.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.data.game.recipe.data; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; +import org.geysermc.mcprotocollib.protocol.data.game.recipe.Ingredient; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KillEntityStatistic.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KillEntityStatistic.java index 46af6e4e..9f6a6f75 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KillEntityStatistic.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KillEntityStatistic.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.statistic; -import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KilledByEntityStatistic.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KilledByEntityStatistic.java index 4564468d..7329da18 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KilledByEntityStatistic.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/game/statistic/KilledByEntityStatistic.java @@ -1,8 +1,8 @@ package org.geysermc.mcprotocollib.protocol.data.game.statistic; -import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoBuilder.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoBuilder.java index 6ad4a1a6..bce498e8 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoBuilder.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoBuilder.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.status.handler; -import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; import org.geysermc.mcprotocollib.network.Session; +import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; public interface ServerInfoBuilder { ServerStatusInfo buildInfo(Session session); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoHandler.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoHandler.java index 3f5b6808..b6443092 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoHandler.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/data/status/handler/ServerInfoHandler.java @@ -1,7 +1,7 @@ package org.geysermc.mcprotocollib.protocol.data.status.handler; -import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; import org.geysermc.mcprotocollib.network.Session; +import org.geysermc.mcprotocollib.protocol.data.status.ServerStatusInfo; public interface ServerInfoHandler { void handle(Session session, ServerStatusInfo info); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCookieRequestPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCookieRequestPacket.java index f11e1c99..664a61ad 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCookieRequestPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCookieRequestPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCustomPayloadPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCustomPayloadPacket.java index 7b750f87..2a472247 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCustomPayloadPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundCustomPayloadPacket.java @@ -1,19 +1,19 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With @AllArgsConstructor public class ClientboundCustomPayloadPacket implements MinecraftPacket { private final @NonNull String channel; - private final byte @NonNull[] data; + private final byte @NonNull [] data; public ClientboundCustomPayloadPacket(ByteBuf in, MinecraftCodecHelper helper) { this.channel = helper.readString(in); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundDisconnectPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundDisconnectPacket.java index 7f426926..cf9b05a1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundDisconnectPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundDisconnectPacket.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundKeepAlivePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundKeepAlivePacket.java index ff77065a..de0806a4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundKeepAlivePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundKeepAlivePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundPingPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundPingPacket.java index 24eff51b..b11c4bfd 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundPingPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundPingPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPopPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPopPacket.java index 7b21fd03..5d63071b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPopPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPopPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPushPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPushPacket.java index ffc1d05a..4aec3c92 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPushPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundResourcePackPushPacket.java @@ -1,7 +1,5 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; @@ -9,6 +7,8 @@ import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundStoreCookiePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundStoreCookiePacket.java index 5de8a9f1..0adace16 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundStoreCookiePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundStoreCookiePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundTransferPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundTransferPacket.java index a9430f19..2bc8d109 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundTransferPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundTransferPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundUpdateTagsPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundUpdateTagsPacket.java index 670f4c37..aadad28a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundUpdateTagsPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ClientboundUpdateTagsPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.util.HashMap; import java.util.Map; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ServerboundCookieResponsePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ServerboundCookieResponsePacket.java index 8fbdb1a8..87627228 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ServerboundCookieResponsePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/clientbound/ServerboundCookieResponsePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import org.jetbrains.annotations.Nullable; @Data @@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable; @AllArgsConstructor public class ServerboundCookieResponsePacket implements MinecraftPacket { private final String key; - private final byte @Nullable[] payload; + private final byte @Nullable [] payload; public ServerboundCookieResponsePacket(ByteBuf in, MinecraftCodecHelper helper) { this.key = helper.readResourceLocation(in); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundClientInformationPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundClientInformationPacket.java index 65241fda..51e82c1f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundClientInformationPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundClientInformationPacket.java @@ -1,15 +1,15 @@ package org.geysermc.mcprotocollib.protocol.packet.common.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.HandPreference; -import org.geysermc.mcprotocollib.protocol.data.game.setting.ChatVisibility; -import org.geysermc.mcprotocollib.protocol.data.game.setting.SkinPart; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.HandPreference; +import org.geysermc.mcprotocollib.protocol.data.game.setting.ChatVisibility; +import org.geysermc.mcprotocollib.protocol.data.game.setting.SkinPart; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundCustomPayloadPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundCustomPayloadPacket.java index 179e556a..3be7cd3d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundCustomPayloadPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundCustomPayloadPacket.java @@ -1,19 +1,19 @@ package org.geysermc.mcprotocollib.protocol.packet.common.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With @AllArgsConstructor public class ServerboundCustomPayloadPacket implements MinecraftPacket { private final @NonNull String channel; - private final byte @NonNull[] data; + private final byte @NonNull [] data; public ServerboundCustomPayloadPacket(ByteBuf in, MinecraftCodecHelper helper) { this.channel = helper.readString(in); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundKeepAlivePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundKeepAlivePacket.java index 953b37a0..40da0619 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundKeepAlivePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundKeepAlivePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundPongPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundPongPacket.java index ccabb8d3..3da5d255 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundPongPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundPongPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.common.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundResourcePackPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundResourcePackPacket.java index 266a8720..1bdcef7f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundResourcePackPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/common/serverbound/ServerboundResourcePackPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.common.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.ResourcePackStatus; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.ResourcePackStatus; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundPlayerChatPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundPlayerChatPacket.java index c0fc8bd6..ca87d6ef 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundPlayerChatPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundPlayerChatPacket.java @@ -22,7 +22,7 @@ import java.util.UUID; public class ClientboundPlayerChatPacket implements MinecraftPacket { private final UUID sender; private final int index; - private final byte @Nullable[] messageSignature; + private final byte @Nullable [] messageSignature; private final String content; private final long timeStamp; private final long salt; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundServerDataPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundServerDataPacket.java index e1aaafb0..996c8372 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundServerDataPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/ClientboundServerDataPacket.java @@ -14,7 +14,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; @AllArgsConstructor public class ClientboundServerDataPacket implements MinecraftPacket { private final Component motd; - private final byte @Nullable[] iconBytes; + private final byte @Nullable [] iconBytes; public ClientboundServerDataPacket(ByteBuf in, MinecraftCodecHelper helper) { this.motd = helper.readComponent(in); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundAnimatePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundAnimatePacket.java index 9dfb79a3..6dca267a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundAnimatePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundAnimatePacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Animation; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Animation; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundDamageEventPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundDamageEventPacket.java index 5eb7d7ec..a94a1239 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundDamageEventPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundDamageEventPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; -import org.cloudburstmc.math.vector.Vector3d; import org.checkerframework.checker.nullness.qual.Nullable; +import org.cloudburstmc.math.vector.Vector3d; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @AllArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundEntityEventPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundEntityEventPacket.java index fa4cc250..84a2d07b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundEntityEventPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundEntityEventPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.EntityEvent; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.EntityEvent; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundHurtAnimationPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundHurtAnimationPacket.java index ff183fcd..d7a6b032 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundHurtAnimationPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundHurtAnimationPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosPacket.java index bb4b1d30..5afa47e2 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosRotPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosRotPacket.java index 4070abc7..ba561136 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosRotPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityPosRotPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityRotPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityRotPacket.java index 25c748d0..6099fc77 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityRotPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveEntityRotPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveVehiclePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveVehiclePacket.java index 674ade83..989860d0 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveVehiclePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundMoveVehiclePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundProjectilePowerPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundProjectilePowerPacket.java index 61be6839..a8a99ca5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundProjectilePowerPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundProjectilePowerPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveEntitiesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveEntitiesPacket.java index 4f119ad4..96dc1b0e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveEntitiesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveEntitiesPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveMobEffectPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveMobEffectPacket.java index 50f2fe61..81ac0968 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveMobEffectPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRemoveMobEffectPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.Effect; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.Effect; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRotateHeadPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRotateHeadPacket.java index 75a13caa..3b769fd5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRotateHeadPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundRotateHeadPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityDataPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityDataPacket.java index 3362e879..22081f45 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityDataPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityDataPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.EntityMetadata; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityLinkPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityLinkPacket.java index e04cbfe8..d91fd9e1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityLinkPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityLinkPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityMotionPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityMotionPacket.java index 53a2a98f..fe2c9617 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityMotionPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEntityMotionPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEquipmentPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEquipmentPacket.java index 7457a0ce..95eb9c6b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEquipmentPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetEquipmentPacket.java @@ -1,15 +1,15 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot; -import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Equipment; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.EquipmentSlot; +import org.geysermc.mcprotocollib.protocol.data.game.entity.metadata.Equipment; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetPassengersPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetPassengersPacket.java index 541f436f..2a479e7b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetPassengersPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundSetPassengersPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTakeItemEntityPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTakeItemEntityPacket.java index 2d39031a..5e28f50e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTakeItemEntityPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTakeItemEntityPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTeleportEntityPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTeleportEntityPacket.java index b6f3854d..565b84d3 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTeleportEntityPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundTeleportEntityPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateAttributesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateAttributesPacket.java index 5a2bcf81..f95c11df 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateAttributesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateAttributesPacket.java @@ -1,16 +1,15 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.Identifier; -import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.Attribute; -import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.AttributeModifier; -import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.AttributeType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.Attribute; +import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.AttributeModifier; +import org.geysermc.mcprotocollib.protocol.data.game.entity.attribute.AttributeType; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateMobEffectPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateMobEffectPacket.java index 7118fbc2..985c2dfe 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateMobEffectPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/ClientboundUpdateMobEffectPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.Effect; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.Effect; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundBlockChangedAckPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundBlockChangedAckPacket.java index 51fed79a..9b1e1880 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundBlockChangedAckPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundBlockChangedAckPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerAbilitiesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerAbilitiesPacket.java index 9685ee0d..f18dfa58 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerAbilitiesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerAbilitiesPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEndPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEndPacket.java index 64393fc9..26ba7865 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEndPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEndPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEnterPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEnterPacket.java index 1b385e75..096a6e96 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEnterPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatEnterPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.Data; import lombok.NoArgsConstructor; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatKillPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatKillPacket.java index 8041a304..7dd83493 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatKillPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerCombatKillPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerLookAtPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerLookAtPacket.java index 03ef0c67..c9862d03 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerLookAtPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerLookAtPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.RotationOrigin; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.RotationOrigin; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerPositionPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerPositionPacket.java index b66d51b2..f5465a7f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerPositionPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundPlayerPositionPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PositionElement; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.PositionElement; import java.util.ArrayList; import java.util.Arrays; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetCarriedItemPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetCarriedItemPacket.java index 8aa91222..9ebe13aa 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetCarriedItemPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetCarriedItemPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetExperiencePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetExperiencePacket.java index 94bb833c..ae1e9004 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetExperiencePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetExperiencePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetHealthPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetHealthPacket.java index 0cb3c05b..e6747eaa 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetHealthPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/player/ClientboundSetHealthPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.player; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddEntityPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddEntityPacket.java index 5a2ff2f1..c9515854 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddEntityPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddEntityPacket.java @@ -1,14 +1,21 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.spawn; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.*; -import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.FallingBlockData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.GenericObjectData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.MinecartType; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.ObjectData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.ProjectileData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.SplashPotionData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.WardenData; +import org.geysermc.mcprotocollib.protocol.data.game.entity.type.EntityType; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddExperienceOrbPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddExperienceOrbPacket.java index f0cb68e0..d5531bbb 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddExperienceOrbPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/entity/spawn/ClientboundAddExperienceOrbPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.entity.spawn; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundContainerClosePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundContainerClosePacket.java index 432e1408..191773df 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundContainerClosePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundContainerClosePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundHorseScreenOpenPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundHorseScreenOpenPacket.java index cb6c16ed..0accd19a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundHorseScreenOpenPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundHorseScreenOpenPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundMerchantOffersPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundMerchantOffersPacket.java index f0260bd9..aef6a66d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundMerchantOffersPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundMerchantOffersPacket.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; -import org.geysermc.mcprotocollib.protocol.data.game.inventory.VillagerTrade; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.inventory.VillagerTrade; +import org.geysermc.mcprotocollib.protocol.data.game.item.ItemStack; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenBookPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenBookPacket.java index 181a982c..55f5f2fe 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenBookPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenBookPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.Hand; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenScreenPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenScreenPacket.java index 9cea5c52..19313388 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenScreenPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/inventory/ClientboundOpenScreenPacket.java @@ -1,15 +1,15 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.inventory; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; -import org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; +import org.geysermc.mcprotocollib.protocol.data.game.inventory.ContainerType; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockDestructionPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockDestructionPacket.java index 6191f706..76c0955b 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockDestructionPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockDestructionPacket.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.BlockBreakStage; -import org.cloudburstmc.math.vector.Vector3i; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.BlockBreakStage; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEntityDataPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEntityDataPacket.java index 2249a692..d1131712 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEntityDataPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEntityDataPacket.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.cloudburstmc.nbt.NbtMap; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; -import org.cloudburstmc.math.vector.Vector3i; import org.checkerframework.checker.nullness.qual.Nullable; +import org.cloudburstmc.math.vector.Vector3i; +import org.cloudburstmc.nbt.NbtMap; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEventPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEventPacket.java index 26cda0f3..3d3fe915 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEventPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockEventPacket.java @@ -1,16 +1,33 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.*; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.WobbleStyle; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.BellValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.BellValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.BlockValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.BlockValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.ChestValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.ChestValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.DecoratedPotValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.DecoratedPotValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.EndGatewayValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.EndGatewayValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.GenericBlockValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.GenericBlockValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.MobSpawnerValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.MobSpawnerValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.NoteBlockValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.NoteBlockValueType; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.PistonValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.value.PistonValueType; @Data @With @@ -61,7 +78,7 @@ public class ClientboundBlockEventPacket implements MinecraftPacket { } else if (this.blockId == BELL) { this.type = BellValueType.from(type - 1); this.value = new BellValue(Direction.from(Math.abs(value % 6))); - } else if (this.blockId == DECORATED_POT) { + } else if (this.blockId == DECORATED_POT) { this.type = DecoratedPotValueType.from(type - 1); this.value = new DecoratedPotValue(WobbleStyle.from(Math.abs(value % 2))); } else { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockUpdatePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockUpdatePacket.java index 2e31f233..05b60eb5 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockUpdatePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundBlockUpdatePacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockChangeEntry; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockChangeEntry; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchFinishedPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchFinishedPacket.java index a4d27c10..714e8084 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchFinishedPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchFinishedPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchStartPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchStartPacket.java index 145a620e..acb353de 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchStartPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunkBatchStartPacket.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.Data; import lombok.NoArgsConstructor; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @NoArgsConstructor diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunksBiomesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunksBiomesPacket.java index 997c3c70..222d2e7e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunksBiomesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundChunksBiomesPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.chunk.ChunkBiomeData; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.chunk.ChunkBiomeData; import java.util.ArrayList; import java.util.List; @@ -21,7 +21,7 @@ public class ClientboundChunksBiomesPacket implements MinecraftPacket { int length = helper.readVarInt(in); for (int i = 0; i < length; i++) { long raw = in.readLong(); - this.chunkBiomeData.add(new ChunkBiomeData((int)raw, (int)(raw >> 32), helper.readByteArray(in))); + this.chunkBiomeData.add(new ChunkBiomeData((int) raw, (int) (raw >> 32), helper.readByteArray(in))); } } @@ -29,7 +29,7 @@ public class ClientboundChunksBiomesPacket implements MinecraftPacket { public void serialize(ByteBuf out, MinecraftCodecHelper helper) { helper.writeVarInt(out, this.chunkBiomeData.size()); for (ChunkBiomeData entry : this.chunkBiomeData) { - long raw = (long)entry.getX() & 0xFFFFFFFFL | ((long)entry.getZ() & 0xFFFFFFFFL) << 32; + long raw = (long) entry.getX() & 0xFFFFFFFFL | ((long) entry.getZ() & 0xFFFFFFFFL) << 32; out.writeLong(raw); helper.writeByteArray(out, entry.getBuffer()); } diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundExplodePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundExplodePacket.java index e7734803..86b151d4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundExplodePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundExplodePacket.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.ExplosionInteraction; -import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle; -import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.ExplosionInteraction; +import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle; +import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundForgetLevelChunkPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundForgetLevelChunkPacket.java index be9c6aea..9eeeb869 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundForgetLevelChunkPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundForgetLevelChunkPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With @@ -16,8 +16,8 @@ public class ClientboundForgetLevelChunkPacket implements MinecraftPacket { public ClientboundForgetLevelChunkPacket(ByteBuf in, MinecraftCodecHelper helper) { long chunkPosition = in.readLong(); - this.x = (int)chunkPosition; - this.z = (int)(chunkPosition >> 32); + this.x = (int) chunkPosition; + this.z = (int) (chunkPosition >> 32); } @Override diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundGameEventPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundGameEventPacket.java index 047ade18..5b033612 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundGameEventPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundGameEventPacket.java @@ -1,14 +1,22 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; -import org.geysermc.mcprotocollib.protocol.data.game.level.notify.*; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.player.GameMode; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.DemoMessageValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.ElderGuardianEffectValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.EnterCreditsValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEvent; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.GameEventValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.LimitedCraftingValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.RainStrengthValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.RespawnScreenValue; +import org.geysermc.mcprotocollib.protocol.data.game.level.notify.ThunderStrengthValue; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacket.java index 54a39771..32f9aaf0 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacket.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; +import io.netty.buffer.ByteBuf; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NonNull; +import lombok.With; import org.cloudburstmc.nbt.NbtMap; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import org.geysermc.mcprotocollib.protocol.data.game.level.LightUpdateData; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityInfo; import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockEntityType; -import io.netty.buffer.ByteBuf; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NonNull; -import lombok.With; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelEventPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelEventPacket.java index 4185261f..4b5bcbdc 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelEventPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelEventPacket.java @@ -1,15 +1,29 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; -import org.geysermc.mcprotocollib.protocol.data.game.level.event.*; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.entity.object.Direction; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.BonemealGrowEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.BreakBlockEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.BreakPotionEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.ComposterEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.DragonFireballEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.ElectricSparkData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.FireExtinguishData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.LevelEvent; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.LevelEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.LevelEventType; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.RecordEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.SculkBlockChargeEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.SmokeEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.TrialSpawnerDetectEventData; +import org.geysermc.mcprotocollib.protocol.data.game.level.event.UnknownLevelEventData; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelParticlesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelParticlesPacket.java index f80fdac3..0f9de3cb 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelParticlesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelParticlesPacket.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle; -import org.geysermc.mcprotocollib.protocol.data.game.level.particle.ParticleType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.particle.Particle; +import org.geysermc.mcprotocollib.protocol.data.game.level.particle.ParticleType; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLightUpdatePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLightUpdatePacket.java index b54864c9..5936d1b3 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLightUpdatePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLightUpdatePacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.LightUpdateData; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.LightUpdateData; import java.util.BitSet; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundMapItemDataPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundMapItemDataPacket.java index 290c5c27..f6f69595 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundMapItemDataPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundMapItemDataPacket.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapData; -import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapIcon; -import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapIconType; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapData; +import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapIcon; +import org.geysermc.mcprotocollib.protocol.data.game.level.map.MapIconType; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundOpenSignEditorPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundOpenSignEditorPacket.java index fdf9b0f5..648012a3 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundOpenSignEditorPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundOpenSignEditorPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSectionBlocksUpdatePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSectionBlocksUpdatePacket.java index 4bc1cd1a..d086e63e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSectionBlocksUpdatePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSectionBlocksUpdatePacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockChangeEntry; import io.netty.buffer.ByteBuf; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.game.level.block.BlockChangeEntry; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheCenterPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheCenterPacket.java index 4a9dfff6..bf91c0a1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheCenterPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheCenterPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheRadiusPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheRadiusPacket.java index d28dea5f..f77f6776 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheRadiusPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetChunkCacheRadiusPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetDefaultSpawnPositionPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetDefaultSpawnPositionPacket.java index 4f57a678..dfce1a77 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetDefaultSpawnPositionPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetDefaultSpawnPositionPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import org.cloudburstmc.math.vector.Vector3i; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetSimulationDistancePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetSimulationDistancePacket.java index 4331a3d6..4f42d483 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetSimulationDistancePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetSimulationDistancePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetTimePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetTimePacket.java index 29043dd9..bf84e1d4 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetTimePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetTimePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSoundPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSoundPacket.java index 2ad4dbd6..039cf812 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSoundPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSoundPacket.java @@ -1,16 +1,16 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; +import io.netty.buffer.ByteBuf; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NonNull; +import lombok.With; import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.BuiltinSound; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.CustomSound; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.Sound; import org.geysermc.mcprotocollib.protocol.data.game.level.sound.SoundCategory; -import io.netty.buffer.ByteBuf; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NonNull; -import lombok.With; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundTagQueryPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundTagQueryPacket.java index 77e29217..260cbf46 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundTagQueryPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundTagQueryPacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level; -import org.cloudburstmc.nbt.NbtMap; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import org.checkerframework.checker.nullness.qual.Nullable; +import org.cloudburstmc.nbt.NbtMap; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundInitializeBorderPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundInitializeBorderPacket.java index a5f853f8..a6af2fba 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundInitializeBorderPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundInitializeBorderPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderCenterPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderCenterPacket.java index 9274d32d..89d033a6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderCenterPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderCenterPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderLerpSizePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderLerpSizePacket.java index 39c63894..722b8e4a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderLerpSizePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderLerpSizePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderSizePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderSizePacket.java index d3b4f599..e3487bd1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderSizePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderSizePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDelayPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDelayPacket.java index e3666c18..c5bca0b8 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDelayPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDelayPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDistancePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDistancePacket.java index 1c6494d5..a6e5e281 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDistancePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/border/ClientboundSetBorderWarningDistancePacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.level.border; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetObjectivePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetObjectivePacket.java index 2e5d9730..effcb78c 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetObjectivePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/scoreboard/ClientboundSetObjectivePacket.java @@ -41,11 +41,11 @@ public class ClientboundSetObjectivePacket implements MinecraftPacket { /** * Constructs a ServerScoreboardObjectivePacket for adding or updating an objective. * - * @param name Name of the objective. - * @param action Action to perform. - * @param displayName Display name of the objective. - * @param type Type of score. - * @param numberFormat Number formatting. + * @param name Name of the objective. + * @param action Action to perform. + * @param displayName Display name of the objective. + * @param type Type of score. + * @param numberFormat Number formatting. */ public ClientboundSetObjectivePacket(@NonNull String name, @NonNull ObjectiveAction action, @Nullable Component displayName, @Nullable ScoreType type, @Nullable NumberFormat numberFormat) { if ((action == ObjectiveAction.ADD || action == ObjectiveAction.UPDATE) && (displayName == null || type == null)) { diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundClearTitlesPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundClearTitlesPacket.java index 54809f5a..f5832deb 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundClearTitlesPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundClearTitlesPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.title; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetActionBarTextPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetActionBarTextPacket.java index 5c3acd9d..190ffc6e 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetActionBarTextPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetActionBarTextPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.title; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetSubtitleTextPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetSubtitleTextPacket.java index 0c8501ec..220fe1f9 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetSubtitleTextPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetSubtitleTextPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.title; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitleTextPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitleTextPacket.java index 3dd9186a..890abbe6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitleTextPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitleTextPacket.java @@ -1,15 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.title; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; -import lombok.NonNull; -import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitlesAnimationPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitlesAnimationPacket.java index e53ac2f4..d5e02bbe 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitlesAnimationPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/title/ClientboundSetTitlesAnimationPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.title; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundCustomQueryPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundCustomQueryPacket.java index 4a17bca3..8836deb1 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundCustomQueryPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundCustomQueryPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.login.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With @@ -14,7 +14,7 @@ import lombok.With; public class ClientboundCustomQueryPacket implements MinecraftPacket { private final int messageId; private final @NonNull String channel; - private final byte @NonNull[] data; + private final byte @NonNull [] data; public ClientboundCustomQueryPacket(ByteBuf in, MinecraftCodecHelper helper) { this.messageId = helper.readVarInt(in); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundGameProfilePacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundGameProfilePacket.java index 52a45215..2a3cce2f 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundGameProfilePacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundGameProfilePacket.java @@ -1,13 +1,13 @@ package org.geysermc.mcprotocollib.protocol.packet.login.clientbound; import com.github.steveice10.mc.auth.data.GameProfile; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.util.ArrayList; import java.util.List; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundHelloPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundHelloPacket.java index 31b7d60b..144ddaed 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundHelloPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundHelloPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.login.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.security.GeneralSecurityException; import java.security.KeyFactory; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginCompressionPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginCompressionPacket.java index f012320c..26a9fba9 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginCompressionPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginCompressionPacket.java @@ -1,11 +1,11 @@ package org.geysermc.mcprotocollib.protocol.packet.login.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java index 41634f30..44441204 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/clientbound/ClientboundLoginDisconnectPacket.java @@ -1,14 +1,14 @@ package org.geysermc.mcprotocollib.protocol.packet.login.clientbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; -import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; import net.kyori.adventure.text.Component; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; +import org.geysermc.mcprotocollib.protocol.data.DefaultComponentSerializer; @Data @With diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundCustomQueryAnswerPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundCustomQueryAnswerPacket.java index cb575d88..f2735ab6 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundCustomQueryAnswerPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundCustomQueryAnswerPacket.java @@ -1,19 +1,19 @@ package org.geysermc.mcprotocollib.protocol.packet.login.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.With; import org.checkerframework.checker.nullness.qual.Nullable; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @With @AllArgsConstructor public class ServerboundCustomQueryAnswerPacket implements MinecraftPacket { private final int transactionId; - private final byte @Nullable[] data; + private final byte @Nullable [] data; public ServerboundCustomQueryAnswerPacket(int transactionId) { this(transactionId, new byte[0]); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundHelloPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundHelloPacket.java index 0ec78216..0691788a 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundHelloPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundHelloPacket.java @@ -1,12 +1,12 @@ package org.geysermc.mcprotocollib.protocol.packet.login.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NonNull; import lombok.With; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import java.util.UUID; diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundKeyPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundKeyPacket.java index 29c402d1..d4337237 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundKeyPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundKeyPacket.java @@ -1,22 +1,25 @@ package org.geysermc.mcprotocollib.protocol.packet.login.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.EqualsAndHashCode; import lombok.NonNull; import lombok.ToString; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; -import java.security.*; +import java.security.GeneralSecurityException; +import java.security.Key; +import java.security.PrivateKey; +import java.security.PublicKey; @ToString @EqualsAndHashCode public class ServerboundKeyPacket implements MinecraftPacket { - private final byte @NonNull[] sharedKey; - private final byte @NonNull[] encryptedChallenge; + private final byte @NonNull [] sharedKey; + private final byte @NonNull [] encryptedChallenge; public ServerboundKeyPacket(PublicKey publicKey, SecretKey secretKey, byte[] challenge) { this.sharedKey = runEncryption(Cipher.ENCRYPT_MODE, publicKey, secretKey.getEncoded()); diff --git a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundLoginAcknowledgedPacket.java b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundLoginAcknowledgedPacket.java index 1f8e8e3f..14800c6d 100644 --- a/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundLoginAcknowledgedPacket.java +++ b/protocol/src/main/java/org/geysermc/mcprotocollib/protocol/packet/login/serverbound/ServerboundLoginAcknowledgedPacket.java @@ -1,10 +1,10 @@ package org.geysermc.mcprotocollib.protocol.packet.login.serverbound; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; -import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; import io.netty.buffer.ByteBuf; import lombok.Data; import lombok.NoArgsConstructor; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftCodecHelper; +import org.geysermc.mcprotocollib.protocol.codec.MinecraftPacket; @Data @NoArgsConstructor diff --git a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/data/ChunkTest.java b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/data/ChunkTest.java index eae71c34..b9708c35 100644 --- a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/data/ChunkTest.java +++ b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/data/ChunkTest.java @@ -10,6 +10,7 @@ import io.netty.buffer.Unpooled; import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; + import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacketTest.java b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacketTest.java index 104e12b9..f4a52ca0 100644 --- a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacketTest.java +++ b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundLevelChunkWithLightPacketTest.java @@ -19,7 +19,7 @@ public class ClientboundLevelChunkWithLightPacketTest extends PacketTest { new LightUpdateData(new BitSet(), new BitSet(), new BitSet(), new BitSet(), Collections.emptyList(), Collections.emptyList()) ), new ClientboundLevelChunkWithLightPacket(1, 1, - new byte[256], NbtMap.EMPTY, new BlockEntityInfo[] { + new byte[256], NbtMap.EMPTY, new BlockEntityInfo[]{ new BlockEntityInfo(1, 0, 1, BlockEntityType.CHEST, null) }, new LightUpdateData(new BitSet(), new BitSet(), new BitSet(), new BitSet(), Collections.emptyList(), Collections.emptyList()) ) diff --git a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetEntityDataPacketTest.java b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetEntityDataPacketTest.java index 41536e32..c2f7b6af 100644 --- a/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetEntityDataPacketTest.java +++ b/protocol/src/test/java/org/geysermc/mcprotocollib/protocol/packet/ingame/clientbound/level/ClientboundSetEntityDataPacketTest.java @@ -22,10 +22,10 @@ public class ClientboundSetEntityDataPacketTest extends PacketTest { public void setup() { this.setPackets( new ClientboundSetEntityDataPacket(0, new EntityMetadata[0]), - new ClientboundSetEntityDataPacket(20, new EntityMetadata[] { + new ClientboundSetEntityDataPacket(20, new EntityMetadata[]{ new ObjectEntityMetadata<>(1, MetadataType.STRING, "Hello!") }), - new ClientboundSetEntityDataPacket(2, new EntityMetadata[] { + new ClientboundSetEntityDataPacket(2, new EntityMetadata[]{ new BooleanEntityMetadata(0, MetadataType.BOOLEAN, true), new ByteEntityMetadata(4, MetadataType.BYTE, (byte) 45), new IntEntityMetadata(2, MetadataType.INT, 555), @@ -36,7 +36,7 @@ public class ClientboundSetEntityDataPacketTest extends PacketTest { new ObjectEntityMetadata<>(6, MetadataType.DIRECTION, Direction.EAST), new ObjectEntityMetadata<>(7, MetadataType.OPTIONAL_VARINT, OptionalInt.of(1038)) }), - new ClientboundSetEntityDataPacket(700, new EntityMetadata[] { + new ClientboundSetEntityDataPacket(700, new EntityMetadata[]{ // Boxed variation test new ObjectEntityMetadata<>(0, MetadataType.INT, 0), new ObjectEntityMetadata<>(1, MetadataType.FLOAT, 1.0f)