mirror of
https://github.com/PaperMC/Paper.git
synced 2024-08-27 06:59:52 +02:00
bf92f3e4db
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 9153f77e PR-841: Remove incorrect ClickType.CONTROL_DROP from ClickType#isShiftClick bceda6ab PR-840: Adjust annotations in Display entity interface a6b85ac3 PR-835: Add Jukebox#hasRecord() and #startPlaying(), clarify #setRecord() CraftBukkit Changes: e142fb9fd SPIGOT-7188: ChunkSnapshot biome y coordinate doesn't match chunk biome y coord eff1743b9 SPIGOT-7313: More accurately edit data on Jukeboxes
25 lines
1.5 KiB
Diff
25 lines
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Wed, 15 Sep 2021 14:52:42 -0700
|
|
Subject: [PATCH] config for disabling entity tag tags
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
index fa10d60cf7f80c429690f20c3bccdd8bbe7752e8..ceacc0d383e2ee674783d3c0a7df0a951595faca 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
@@ -492,6 +492,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
|
if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
|
|
CompoundTag nbttagcompound1 = entity.saveWithoutId(new CompoundTag());
|
|
UUID uuid = entity.getUUID();
|
|
+ // Paper start - filter out protected tags
|
|
+ if (player == null || !player.getBukkitEntity().hasPermission("minecraft.nbt.place")) {
|
|
+ for (net.minecraft.commands.arguments.NbtPathArgument.NbtPath tag : world.paperConfig().entities.spawning.filteredEntityTagNbtPaths) {
|
|
+ tag.remove(itemNbt.getCompound("EntityTag"));
|
|
+ }
|
|
+ }
|
|
+ // Paper end
|
|
|
|
nbttagcompound1.merge(itemNbt.getCompound("EntityTag"));
|
|
entity.setUUID(uuid);
|