Skip to content

Commit

Permalink
1.0.5 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticdrew committed Apr 15, 2024
1 parent 6b90a76 commit 84ce79b
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Supplier;

import static net.minecraftforge.network.NetworkDirection.PLAY_TO_CLIENT;

public class ForgeNetworkHandler extends PacketRegistrationHandler
{
Expand All @@ -34,7 +31,7 @@ protected <T> void registerPacket(PacketContainer<T> container)
{
if (CHANNELS.get(container.messageType()) == null)
{
SimpleChannel channel = NetworkRegistry.ChannelBuilder
SimpleChannel channel = ChannelBuilder
.named(container.packetIdentifier())
.clientAcceptedVersions((a, b) -> true)
.serverAcceptedVersions((a, b) -> true)
Expand Down Expand Up @@ -79,7 +76,7 @@ public <T> void sendToClient(T packet, ServerPlayer player)
SimpleChannel channel = CHANNELS.get(packet.getClass());
if (channel != null)
{
Connection connection = player.connection.connection;
Connection connection = player.connection.getConnection();
if (channel.isRemotePresent(connection))
{
channel.send(packet, PacketDistributor.PLAYER.with(player));
Expand Down

0 comments on commit 84ce79b

Please sign in to comment.