2022-12-28 03:59:15 +01:00
|
|
|
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
|
2023-01-27 21:52:04 +01:00
|
|
|
index 65b829ad019eb167bf7a9c4931e3006146dd742e..41ff954010c11d524ffb90abd22c29a1d8d8f5a0 100644
|
2022-12-28 03:59:15 +01:00
|
|
|
--- 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);
|