From 90c9f981f6e7acf51d0f6bfdd0309bc40ac18062 Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Mon, 21 Oct 2024 01:51:28 +0200 Subject: [PATCH] Missing paper comment --- ...pand-scoreboard-tag-count-validation-to-API-set.patch} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename patches/server/{1069-Create-LimitedSet-for-entity-scoreboard-tags.patch => 1069-Expand-scoreboard-tag-count-validation-to-API-set.patch} (79%) diff --git a/patches/server/1069-Create-LimitedSet-for-entity-scoreboard-tags.patch b/patches/server/1069-Expand-scoreboard-tag-count-validation-to-API-set.patch similarity index 79% rename from patches/server/1069-Create-LimitedSet-for-entity-scoreboard-tags.patch rename to patches/server/1069-Expand-scoreboard-tag-count-validation-to-API-set.patch index 2f84118578..f81a7a6179 100644 --- a/patches/server/1069-Create-LimitedSet-for-entity-scoreboard-tags.patch +++ b/patches/server/1069-Expand-scoreboard-tag-count-validation-to-API-set.patch @@ -1,11 +1,11 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Intybyte Date: Mon, 21 Oct 2024 01:41:04 +0200 -Subject: [PATCH] Create LimitedSet for entity scoreboard tags +Subject: [PATCH] Expand scoreboard tag count validation to API set diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..2711cd3b13686efdb3227cf681ddcf98ee82fd06 100644 +index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..d9ae35015c8d6023c6b1053e3b1a528dd31b0673 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -566,7 +566,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -13,7 +13,7 @@ index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..2711cd3b13686efdb3227cf681ddcf98 this.uuid = Mth.createInsecureUUID(this.random); this.stringUUID = this.uuid.toString(); - this.tags = Sets.newHashSet(); -+ this.tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); ++ this.tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl this.pistonDeltas = new double[]{0.0D, 0.0D, 0.0D}; this.mainSupportingBlockPos = Optional.empty(); this.onGroundNoBlocks = false; @@ -22,7 +22,7 @@ index 4b54d0ea31062972e68ee8fafe3cfaf68f65a5cd..2711cd3b13686efdb3227cf681ddcf98 public boolean addTag(String tag) { - return this.tags.size() >= 1024 ? false : this.tags.add(tag); -+ return this.tags.add(tag); // Paper - Create Limited set for Entity ++ return this.tags.add(tag); // Paper - fully limit tag size - replace set impl } public boolean removeTag(String tag) {