mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2025-03-14 07:00:03 -04:00
Fix annotations
This commit is contained in:
parent
c8a023c4f0
commit
3e307e5311
2 changed files with 3 additions and 2 deletions
src/main/java/com/github/steveice10/mc/protocol
codec
packet/ingame/serverbound/inventory
|
@ -242,7 +242,7 @@ public class MinecraftCodecHelper extends BasePacketCodecHelper {
|
|||
return new ItemStack(item, buf.readByte(), this.readAnyTag(buf));
|
||||
}
|
||||
|
||||
public void writeItemStack(ByteBuf buf, ItemStack item) throws IOException {
|
||||
public void writeItemStack(ByteBuf buf, @Nullable ItemStack item) throws IOException {
|
||||
buf.writeBoolean(item != null);
|
||||
if (item != null) {
|
||||
this.writeVarInt(buf, item.getId());
|
||||
|
|
|
@ -8,6 +8,7 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.Data;
|
||||
import lombok.NonNull;
|
||||
import lombok.With;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -16,7 +17,7 @@ import java.io.IOException;
|
|||
@AllArgsConstructor
|
||||
public class ServerboundSetCreativeModeSlotPacket implements MinecraftPacket {
|
||||
private final int slot;
|
||||
private final ItemStack clickedItem;
|
||||
private final @Nullable ItemStack clickedItem;
|
||||
|
||||
public ServerboundSetCreativeModeSlotPacket(ByteBuf in, MinecraftCodecHelper helper) throws IOException {
|
||||
this.slot = in.readShort();
|
||||
|
|
Loading…
Reference in a new issue