geforkt von Mirrors/Paper
Limit ResourceLocation length to nbt string tag length
Dieser Commit ist enthalten in:
Ursprung
ec196207c2
Commit
f28caff927
@ -21,6 +21,18 @@ index 18fad4f083862ace2bc56579883f548f6d697091..80083fed4b44b9d433925f09db83e559
|
|||||||
if (optional.isEmpty()) {
|
if (optional.isEmpty()) {
|
||||||
return Blocks.AIR.defaultBlockState();
|
return Blocks.AIR.defaultBlockState();
|
||||||
} else {
|
} else {
|
||||||
|
diff --git a/src/main/java/net/minecraft/resources/ResourceLocation.java b/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||||
|
index 38e2a8cec48bc779b8154d6d719031f457a2403e..9024622a41fdc774713481973c1419a8d18cce93 100644
|
||||||
|
--- a/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||||
|
+++ b/src/main/java/net/minecraft/resources/ResourceLocation.java
|
||||||
|
@@ -31,6 +31,7 @@ public class ResourceLocation implements Comparable<ResourceLocation> {
|
||||||
|
private final String path;
|
||||||
|
|
||||||
|
protected ResourceLocation(String namespace, String path, @Nullable ResourceLocation.Dummy extraData) {
|
||||||
|
+ if (io.netty.buffer.ByteBufUtil.utf8MaxBytes(namespace + ":" + path) > 2 * Short.MAX_VALUE + 1) throw new ResourceLocationException("Resource location too long: " + namespace + ":" + path); // Paper - Validate ResourceLocation
|
||||||
|
this.namespace = namespace;
|
||||||
|
this.path = path;
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
index 00389d7ec3e8b059d5591a2019ba240fda2901fe..6cfce9755dd464a7afb01f9032e567ce3bcd5bc5 100644
|
index 00389d7ec3e8b059d5591a2019ba240fda2901fe..6cfce9755dd464a7afb01f9032e567ce3bcd5bc5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren