Skip to content

Commit

Permalink
Update FileTransferPacket.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AViewFromTheTop committed Sep 25, 2024
1 parent 033885b commit bbc4cbc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package net.frozenblock.lib.image_transfer;

import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
import net.frozenblock.lib.FrozenSharedConstants;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -31,10 +31,9 @@
import java.io.FileInputStream;
import java.io.IOException;

public record FileTransferPacket(String transferPath, String fileName, boolean request,
byte[] bytes) implements CustomPacketPayload {
public record FileTransferPacket(String transferPath, String fileName, boolean request, byte[] bytes) implements CustomPacketPayload {
public static final Type<FileTransferPacket> PACKET_TYPE = new Type<>(
ResourceLocation.tryBuild("camera_port", "file_transfer")
FrozenSharedConstants.id("file_transfer")
);
public static final StreamCodec<FriendlyByteBuf, FileTransferPacket> STREAM_CODEC = StreamCodec.ofMember(FileTransferPacket::write, FileTransferPacket::create);

Expand Down

0 comments on commit bbc4cbc

Please sign in to comment.