Skip to content

Commit

Permalink
Fix javax annotations compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Protonull authored and Gjum committed Apr 25, 2024
1 parent 1abb272 commit c06ed2f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import io.netty.buffer.ByteBuf;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;

/**
* This packet is sent in two situations:
*
Expand All @@ -19,7 +17,7 @@ public class ChunkTilePacket implements Packet {

public final ChunkTile chunkTile;

public ChunkTilePacket(@Nonnull ChunkTile chunkTile) {
public ChunkTilePacket(@NotNull ChunkTile chunkTile) {
this.chunkTile = chunkTile;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import gjum.minecraft.mapsync.common.net.Packet;
import io.netty.buffer.ByteBuf;
import net.minecraft.core.Registry;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -20,9 +20,9 @@ public class ClientboundChunkTimestampsResponsePacket implements Packet {
/**
* sorted by newest to oldest
*/
public final @Nonnull List<CatchupChunk> chunks;
public final @NotNull List<CatchupChunk> chunks;

public ClientboundChunkTimestampsResponsePacket(@Nonnull List<CatchupChunk> chunks) {
public ClientboundChunkTimestampsResponsePacket(@NotNull List<CatchupChunk> chunks) {
this.chunks = chunks;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import gjum.minecraft.mapsync.common.net.Packet;
import io.netty.buffer.ByteBuf;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.security.*;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
Expand All @@ -15,12 +15,10 @@
public class ClientboundEncryptionRequestPacket implements Packet {
public static final int PACKET_ID = 2;

@Nonnull
public final PublicKey publicKey;
@Nonnull
public final byte[] verifyToken;
public final @NotNull PublicKey publicKey;
public final byte @NotNull [] verifyToken;

public ClientboundEncryptionRequestPacket(@Nonnull PublicKey publicKey, @Nonnull byte[] verifyToken) {
public ClientboundEncryptionRequestPacket(@NotNull PublicKey publicKey, byte @NotNull [] verifyToken) {
this.publicKey = publicKey;
this.verifyToken = verifyToken;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import java.util.List;

/**
Expand All @@ -27,7 +26,7 @@ public class ServerboundCatchupRequestPacket implements Packet {
/**
* Chunks must all be in the same dimension
*/
public ServerboundCatchupRequestPacket(@Nonnull List<CatchupChunk> chunks) {
public ServerboundCatchupRequestPacket(@NotNull List<CatchupChunk> chunks) {
if (chunks.isEmpty()) throw new Error("Chunks list must not be empty");
ResourceKey<Level> dim = null;
for (CatchupChunk chunk : chunks) {
Expand Down

0 comments on commit c06ed2f

Please sign in to comment.