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
|
2024-01-24 15:57:53 +01:00
|
|
|
index dcdc982b22b7fc836e6ad423a75c75c1d33eb7d8..fe8efe89c7d390ff9565f388685b57daeebfd08b 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
|
2023-12-06 17:21:56 +01:00
|
|
|
@@ -497,6 +497,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
|
2022-12-28 03:59:15 +01:00
|
|
|
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"));
|
|
|
|
+ }
|
|
|
|
+ }
|
2024-01-16 12:41:40 +01:00
|
|
|
+ // Paper end - filter out protected tags
|
2022-12-28 03:59:15 +01:00
|
|
|
|
|
|
|
nbttagcompound1.merge(itemNbt.getCompound("EntityTag"));
|
|
|
|
entity.setUUID(uuid);
|