mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 00:30:25 +01:00
Missing paper comment
This commit is contained in:
parent
364181d414
commit
90c9f981f6
1 changed files with 4 additions and 4 deletions
|
@ -1,11 +1,11 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Intybyte <vaan.testwork@gmail.com>
|
||||
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) {
|
Loading…
Reference in a new issue