diff options
author | Anthony Hilyard <anthony.hilyard@gmail.com> | 2021-10-13 22:51:23 -0700 |
---|---|---|
committer | Anthony Hilyard <anthony.hilyard@gmail.com> | 2021-10-13 22:51:23 -0700 |
commit | 407a3cfabed3869b38527153e8b3322a824f1263 (patch) | |
tree | 06909dc024d048e999354a0c7102a57bccf32ef8 /src/main/java/com/anthonyhilyard/iceberg/network | |
parent | 0eb0e8504684ad9e7bdae99a54de618809cee8d4 (diff) | |
download | Iceberg-407a3cfabed3869b38527153e8b3322a824f1263.tar.gz Iceberg-407a3cfabed3869b38527153e8b3322a824f1263.tar.bz2 Iceberg-407a3cfabed3869b38527153e8b3322a824f1263.zip |
Initial commit for 1.17.1 version.
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/network')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/network/IcebergNetworkProtocol.java | 6 | ||||
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/network/NewItemPickupEventPacket.java | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/network/IcebergNetworkProtocol.java b/src/main/java/com/anthonyhilyard/iceberg/network/IcebergNetworkProtocol.java index d0dd1c8..4b5db06 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/network/IcebergNetworkProtocol.java +++ b/src/main/java/com/anthonyhilyard/iceberg/network/IcebergNetworkProtocol.java @@ -2,9 +2,9 @@ package com.anthonyhilyard.iceberg.network; import com.anthonyhilyard.iceberg.Loader; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.network.NetworkRegistry; -import net.minecraftforge.fml.network.simple.SimpleChannel; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.fmllegacy.network.NetworkRegistry; +import net.minecraftforge.fmllegacy.network.simple.SimpleChannel; public class IcebergNetworkProtocol { diff --git a/src/main/java/com/anthonyhilyard/iceberg/network/NewItemPickupEventPacket.java b/src/main/java/com/anthonyhilyard/iceberg/network/NewItemPickupEventPacket.java index 23df08b..b99a36d 100644 --- a/src/main/java/com/anthonyhilyard/iceberg/network/NewItemPickupEventPacket.java +++ b/src/main/java/com/anthonyhilyard/iceberg/network/NewItemPickupEventPacket.java @@ -1,9 +1,9 @@ package com.anthonyhilyard.iceberg.network; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.network.FriendlyByteBuf; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.network.NetworkEvent; +import net.minecraftforge.fmllegacy.network.NetworkEvent; import java.util.UUID; import java.util.function.Supplier; @@ -22,13 +22,13 @@ public final class NewItemPickupEventPacket this.item = item; } - public static void encode(final NewItemPickupEventPacket msg, final PacketBuffer packetBuffer) + public static void encode(final NewItemPickupEventPacket msg, final FriendlyByteBuf packetBuffer) { packetBuffer.writeUUID(msg.playerUUID); packetBuffer.writeItem(msg.item); } - public static NewItemPickupEventPacket decode(final PacketBuffer packetBuffer) + public static NewItemPickupEventPacket decode(final FriendlyByteBuf packetBuffer) { return new NewItemPickupEventPacket(packetBuffer.readUUID(), packetBuffer.readItem()); } |