Skip to content

Commit

Permalink
Fix packets not being sent
Browse files Browse the repository at this point in the history
  • Loading branch information
ZockerAxel committed Oct 12, 2023
1 parent e0f162e commit 99aa164
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.network.protocol.game.PacketPlayInAdvancements;
import net.minecraft.network.protocol.game.PacketPlayInAdvancements.Status;
import net.minecraft.server.network.PlayerConnection;
import net.minecraft.server.network.ServerCommonPacketListenerImpl;

public class AdvancementPacketReceiver {

Expand All @@ -36,7 +37,7 @@ public class AdvancementPacketReceiver {
}
}

for(Field f : PlayerConnection.class.getDeclaredFields()) {
for(Field f : ServerCommonPacketListenerImpl.class.getDeclaredFields()) {
if(f.getType().isAssignableFrom(NetworkManager.class)) {
networkManagerField = f;
networkManagerField.setAccessible(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected net.minecraft.advancements.Advancement convertAdvancement(Advancement
*/
public void send() {
PacketPlayOutAdvancements packet = build();
((CraftPlayer) getPlayer()).getHandle().c.a(packet);
((CraftPlayer) getPlayer()).getHandle().c.a(packet, null);
}


Expand Down

0 comments on commit 99aa164

Please sign in to comment.