mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-20 15:57:49 +01:00
Handle fake entities (negative ID)
This commit is contained in:
parent
b589749c24
commit
269a4bec72
@ -177,6 +177,10 @@ public class ProtocolLibHookImpl implements ProtocolLibHook {
|
|||||||
|
|
||||||
|
|
||||||
private Entity getEntity(PacketEvent packetEvent, EntityRelatedPacketWrapper packetWrapper) {
|
private Entity getEntity(PacketEvent packetEvent, EntityRelatedPacketWrapper packetWrapper) {
|
||||||
|
if (packetWrapper.getEntityID() < 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!useGetEntityWorkaround) {
|
if (!useGetEntityWorkaround) {
|
||||||
try {
|
try {
|
||||||
return packetWrapper.getEntity(packetEvent);
|
return packetWrapper.getEntity(packetEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user