Skip to content

Commit cefe77d

Browse files
committed
Fixed: Neoforge ignore check<
1 parent 8bd583a commit cefe77d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

doc/changelog.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ <h1>Common Networking ${version} for Minecraft ${mcversion}</h1>
1010

1111
<p>New in ${version}</p>
1212
<ul>
13-
<li>Added: Configuration packets this is a beta version, please understand there may be issues.</li>
13+
<li>Fixed: Neoforge ignore check</li>
1414
</ul>

neoforge/src/main/java/commonnetwork/networking/NeoForgeNetworkHandler.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,14 @@ public <T> void sendToClient(T packet, ServerPlayer player, boolean ignoreCheck)
9696
PacketContainer<T> container = (PacketContainer<T>) PACKET_MAP.get(packet.getClass());
9797
if (container != null)
9898
{
99-
if (ignoreCheck || player.connection.hasChannel(container.type()))
99+
if (player.connection.hasChannel(container.type()))
100100
{
101101
PacketDistributor.sendToPlayer(player, new CommonPacketWrapper<>(container, packet));
102102
}
103+
else if (ignoreCheck)
104+
{
105+
send(packet, player.connection.getConnection());
106+
}
103107
}
104108
else
105109
{

0 commit comments

Comments
 (0)