mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-29 04:28:21 +01:00
@NotNull for ClientPacket#read
This commit is contained in:
parent
1b7613d977
commit
8346bb85ed
@ -1,9 +1,10 @@
|
||||
package net.minestom.server.network.packet.client;
|
||||
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface ClientPacket {
|
||||
|
||||
void read(BinaryReader reader);
|
||||
void read(@NotNull BinaryReader reader);
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class HandshakePacket implements ClientPreplayPacket {
|
||||
private int nextState;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.protocolVersion = reader.readVarInt();
|
||||
this.serverAddress = reader.readSizedString();
|
||||
this.serverPort = reader.readUnsignedShort();
|
||||
|
@ -76,7 +76,7 @@ public class EncryptionResponsePacket implements ClientPreplayPacket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
sharedSecret = ByteArrayData.decodeByteArray(reader);
|
||||
verifyToken = ByteArrayData.decodeByteArray(reader);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ public class LoginStartPacket implements ClientPreplayPacket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.username = reader.readSizedString();
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.advancements.AdvancementAction;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientAdvancementTabPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientAdvancementTabPacket extends ClientPlayPacket {
|
||||
public String tabIdentifier;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.action = AdvancementAction.values()[reader.readVarInt()];
|
||||
|
||||
if (action == AdvancementAction.OPENED_TAB) {
|
||||
|
@ -3,13 +3,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientAnimationPacket extends ClientPlayPacket {
|
||||
|
||||
public Player.Hand hand;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.hand = Player.Hand.values()[reader.readVarInt()];
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientChatMessagePacket extends ClientPlayPacket {
|
||||
|
||||
public String message;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.message = reader.readSizedString();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientClickWindowButtonPacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientClickWindowButtonPacket extends ClientPlayPacket {
|
||||
public byte buttonId;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.windowId = reader.readByte();
|
||||
this.buttonId = reader.readByte();
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientClickWindowPacket extends ClientPlayPacket {
|
||||
|
||||
@ -14,7 +15,7 @@ public class ClientClickWindowPacket extends ClientPlayPacket {
|
||||
public ItemStack item;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.windowId = reader.readByte();
|
||||
this.slot = reader.readShort();
|
||||
this.button = reader.readByte();
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientCloseWindow extends ClientPlayPacket {
|
||||
|
||||
public int windowId;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.windowId = reader.readVarInt();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientCraftRecipeRequest extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientCraftRecipeRequest extends ClientPlayPacket {
|
||||
public boolean makeAll;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.windowId = reader.readByte();
|
||||
this.recipe = reader.readSizedString();
|
||||
this.makeAll = reader.readBoolean();
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.item.ItemStack;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientCreativeInventoryActionPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientCreativeInventoryActionPacket extends ClientPlayPacket {
|
||||
public ItemStack item;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.slot = reader.readShort();
|
||||
this.item = reader.readSlot();
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientEntityActionPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientEntityActionPacket extends ClientPlayPacket {
|
||||
public int horseJumpBoost;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.playerId = reader.readVarInt();
|
||||
this.action = Action.values()[reader.readVarInt()];
|
||||
this.horseJumpBoost = reader.readVarInt();
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientHeldItemChangePacket extends ClientPlayPacket {
|
||||
|
||||
public short slot;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.slot = reader.readShort();
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientInteractEntityPacket extends ClientPlayPacket {
|
||||
|
||||
@ -15,7 +16,7 @@ public class ClientInteractEntityPacket extends ClientPlayPacket {
|
||||
public boolean sneaking;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.targetId = reader.readVarInt();
|
||||
this.type = Type.values()[reader.readVarInt()];
|
||||
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientKeepAlivePacket extends ClientPlayPacket {
|
||||
|
||||
public long id;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.id = reader.readLong();
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientNameItemPacket extends ClientPlayPacket {
|
||||
|
||||
public String itemName;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.itemName = reader.readSizedString();
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPickItemPacket extends ClientPlayPacket {
|
||||
|
||||
public int slotToUse;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.slotToUse = reader.readVarInt();
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerAbilitiesPacket extends ClientPlayPacket {
|
||||
|
||||
public byte flags;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.flags = reader.readByte();
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import net.minestom.server.instance.block.BlockFace;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerBlockPlacementPacket extends ClientPlayPacket {
|
||||
|
||||
@ -15,7 +16,7 @@ public class ClientPlayerBlockPlacementPacket extends ClientPlayPacket {
|
||||
public boolean insideBlock;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.hand = Player.Hand.values()[reader.readVarInt()];
|
||||
this.blockPosition = reader.readBlockPosition();
|
||||
this.blockFace = BlockFace.values()[reader.readVarInt()];
|
||||
|
@ -4,6 +4,7 @@ import net.minestom.server.instance.block.BlockFace;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerDiggingPacket extends ClientPlayPacket {
|
||||
|
||||
@ -12,7 +13,7 @@ public class ClientPlayerDiggingPacket extends ClientPlayPacket {
|
||||
public BlockFace blockFace;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.status = Status.values()[reader.readVarInt()];
|
||||
this.blockPosition = reader.readBlockPosition();
|
||||
this.blockFace = BlockFace.values()[reader.readByte()];
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerPacket extends ClientPlayPacket {
|
||||
|
||||
public boolean onGround;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.onGround = reader.readBoolean();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerPositionAndRotationPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientPlayerPositionAndRotationPacket extends ClientPlayPacket {
|
||||
public boolean onGround;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.x = reader.readDouble();
|
||||
this.y = reader.readDouble();
|
||||
this.z = reader.readDouble();
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerPositionPacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientPlayerPositionPacket extends ClientPlayPacket {
|
||||
public boolean onGround;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.x = reader.readDouble();
|
||||
this.y = reader.readDouble();
|
||||
this.z = reader.readDouble();
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPlayerRotationPacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientPlayerRotationPacket extends ClientPlayPacket {
|
||||
public boolean onGround;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.yaw = reader.readFloat();
|
||||
this.pitch = reader.readFloat();
|
||||
this.onGround = reader.readBoolean();
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientPluginMessagePacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientPluginMessagePacket extends ClientPlayPacket {
|
||||
public byte[] data;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.channel = reader.readSizedString();
|
||||
this.data = reader.getRemainingBytes();
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientRecipeBookData extends ClientPlayPacket {
|
||||
|
||||
@ -19,7 +20,7 @@ public class ClientRecipeBookData extends ClientPlayPacket {
|
||||
public boolean smokingRecipeFilterActive;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.type = reader.readVarInt();
|
||||
|
||||
switch (type) {
|
||||
|
@ -3,13 +3,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.resourcepack.ResourcePackStatus;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientResourcePackStatusPacket extends ClientPlayPacket {
|
||||
|
||||
public ResourcePackStatus result;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.result = ResourcePackStatus.values()[reader.readVarInt()];
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientSelectTradePacket extends ClientPlayPacket {
|
||||
|
||||
public int selectedSlot;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.selectedSlot = reader.readVarInt();
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientSettingsPacket extends ClientPlayPacket {
|
||||
|
||||
@ -14,7 +15,7 @@ public class ClientSettingsPacket extends ClientPlayPacket {
|
||||
public Player.MainHand mainHand;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.locale = reader.readSizedString();
|
||||
this.viewDistance = reader.readByte();
|
||||
this.chatMode = Player.ChatMode.values()[reader.readVarInt()];
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientSpectatePacket extends ClientPlayPacket {
|
||||
public UUID targetUuid;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
// TODO reader uuid
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientStatusPacket extends ClientPlayPacket {
|
||||
|
||||
public Action action;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.action = Action.values()[reader.readVarInt()];
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientSteerBoatPacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientSteerBoatPacket extends ClientPlayPacket {
|
||||
public boolean rightPaddleTurning;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.leftPaddleTurning = reader.readBoolean();
|
||||
this.rightPaddleTurning = reader.readBoolean();
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientSteerVehiclePacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientSteerVehiclePacket extends ClientPlayPacket {
|
||||
public byte flags;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.sideways = reader.readFloat();
|
||||
this.forward = reader.readFloat();
|
||||
this.flags = reader.readByte();
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientTabCompletePacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientTabCompletePacket extends ClientPlayPacket {
|
||||
public String text;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.transactionId = reader.readVarInt();
|
||||
this.text = reader.readSizedString();
|
||||
}
|
||||
|
@ -2,13 +2,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientTeleportConfirmPacket extends ClientPlayPacket {
|
||||
|
||||
public int teleportId;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.teleportId = reader.readVarInt();
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientUpdateCommandBlockMinecartPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientUpdateCommandBlockMinecartPacket extends ClientPlayPacket {
|
||||
public boolean trackOutput;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.entityId = reader.readVarInt();
|
||||
this.command = reader.readSizedString();
|
||||
this.trackOutput = reader.readBoolean();
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientUpdateCommandBlockPacket extends ClientPlayPacket {
|
||||
|
||||
@ -12,7 +13,7 @@ public class ClientUpdateCommandBlockPacket extends ClientPlayPacket {
|
||||
public byte flags;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.blockPosition = reader.readBlockPosition();
|
||||
this.command = reader.readSizedString();
|
||||
this.mode = Mode.values()[reader.readVarInt()];
|
||||
|
@ -3,6 +3,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.BlockPosition;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientUpdateSignPacket extends ClientPlayPacket {
|
||||
|
||||
@ -13,7 +14,7 @@ public class ClientUpdateSignPacket extends ClientPlayPacket {
|
||||
public String line4;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.blockPosition = reader.readBlockPosition();
|
||||
this.line1 = reader.readSizedString();
|
||||
this.line2 = reader.readSizedString();
|
||||
|
@ -3,13 +3,14 @@ package net.minestom.server.network.packet.client.play;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientUseItemPacket extends ClientPlayPacket {
|
||||
|
||||
public Player.Hand hand;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.hand = Player.Hand.values()[reader.readVarInt()];
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientVehicleMovePacket extends ClientPlayPacket {
|
||||
|
||||
@ -9,7 +10,7 @@ public class ClientVehicleMovePacket extends ClientPlayPacket {
|
||||
public float yaw, pitch;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.x = reader.readDouble();
|
||||
this.y = reader.readDouble();
|
||||
this.z = reader.readDouble();
|
||||
|
@ -2,6 +2,7 @@ package net.minestom.server.network.packet.client.play;
|
||||
|
||||
import net.minestom.server.network.packet.client.ClientPlayPacket;
|
||||
import net.minestom.server.utils.binary.BinaryReader;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ClientWindowConfirmationPacket extends ClientPlayPacket {
|
||||
|
||||
@ -10,7 +11,7 @@ public class ClientWindowConfirmationPacket extends ClientPlayPacket {
|
||||
public boolean accepted;
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.windowId = reader.readByte();
|
||||
this.actionNumber = reader.readShort();
|
||||
this.accepted = reader.readBoolean();
|
||||
|
@ -15,7 +15,7 @@ public class LegacyServerListPingPacket implements ClientPreplayPacket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.payload = reader.readByte();
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public class PingPacket implements ClientPreplayPacket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
this.number = reader.readLong();
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class StatusRequestPacket implements ClientPreplayPacket {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(BinaryReader reader) {
|
||||
public void read(@NotNull BinaryReader reader) {
|
||||
// Empty
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user