mirror of
https://github.com/PaperMC/Paper.git
synced 2024-09-13 15:38:12 +02:00
51cfcc88da
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: d352d965 SPIGOT-7221: Add Enemy (Entity) interface CraftBukkit Changes: 397c5557c SPIGOT-7221: Add Enemy (Entity) interface a0d3dfaf2 PR-1129: Fix state corruption while handling explosion damage on EntityComplexPart d67777f8b SPIGOT-7218: Player's outer layer of skin disappears after respawn
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 e5cd4b7609243669c9d84ff8a4988c209e6101aa..4589f7db68f7a72065c85c0a50216c6d02658f1e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
|
@@ -484,6 +484,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);
|