Skip to content

Commit

Permalink
patch: do not use removeQueue for sink players
Browse files Browse the repository at this point in the history
  • Loading branch information
roccodev committed Aug 3, 2024
1 parent 2b5fb9f commit 373cfc3
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 688afe76f0045df88c2f7a42949a9793ea840fa4 Mon Sep 17 00:00:00 2001
From: RoccoDev <hey@rocco.dev>
Date: Sun, 4 Aug 2024 01:14:04 +0200
Subject: [PATCH] Do not use removeQueue for sink players


diff --git a/src/main/java/dev/rocco/kig/paper/impl/cheetah/SinkEntityPlayer.java b/src/main/java/dev/rocco/kig/paper/impl/cheetah/SinkEntityPlayer.java
index 2570ac669..932ab813d 100644
--- a/src/main/java/dev/rocco/kig/paper/impl/cheetah/SinkEntityPlayer.java
+++ b/src/main/java/dev/rocco/kig/paper/impl/cheetah/SinkEntityPlayer.java
@@ -1,10 +1,7 @@
package dev.rocco.kig.paper.impl.cheetah;

import com.mojang.authlib.GameProfile;
-import net.minecraft.server.EntityPlayer;
-import net.minecraft.server.PacketPlayOutPlayerInfo;
-import net.minecraft.server.PlayerInteractManager;
-import net.minecraft.server.WorldServer;
+import net.minecraft.server.*;
import org.bukkit.Location;

import java.nio.ByteBuffer;
@@ -27,6 +24,12 @@ public class SinkEntityPlayer extends EntityPlayer {
setLocation(spawnLoc.getX(), spawnLoc.getY(), spawnLoc.getZ(), 0f, 0f);
}

+ @Override
+ public void d(Entity entity) {
+ // Don't use removeQueue for entity destroy
+ this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(entity.getId()));
+ }
+
Consumer<ByteBuffer> getPacketConsumer() {
return packetConsumer;
}
--
2.45.2

0 comments on commit 373cfc3

Please sign in to comment.