mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-14 19:34:54 -05:00
Validate block entity tag query positions (#43)
This commit is contained in:
parent
d382eb52e7
commit
ba694be2bc
1 changed files with 19 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Luna <lunahatesgogle@gmail.com>
|
||||
Date: Mon, 11 Jul 2022 17:21:37 -0300
|
||||
Subject: [PATCH] Validate block entity tag query positions
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 0d8d28a324b4bf093d7318be71eb67bb0dad9429..fe549835e0dc0b6c06a16e7471f53170f1d9c7b0 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1273,7 +1273,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@Override
|
||||
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
- if (this.player.hasPermissions(2)) {
|
||||
+ if (this.player.hasPermissions(2) && Level.isInSpawnableBounds(packet.getPos())) { // Scissors - Validate block entity tag query positions
|
||||
BlockEntity tileentity = this.player.getLevel().getBlockEntity(packet.getPos());
|
||||
CompoundTag nbttagcompound = tileentity != null ? tileentity.saveWithoutMetadata() : null;
|
||||
|
Loading…
Reference in a new issue