Skip to content

Commit 948acae

Browse files
committed
Raise existing level.dat data size quota
It appears that custom data may push it to be higher than what the default quota allows for. See https://mojira.dev/MC-307144 Fixes #13820
1 parent ef4e85d commit 948acae

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
.mapOrElse(
1616
Function.identity(),
1717
error -> {
18-
@@ -174,9 +_,9 @@
18+
@@ -174,13 +_,13 @@
1919
}
2020

2121
public static <T extends SavedData> DataResult<T> readExistingSavedData(
@@ -27,6 +27,11 @@
2727

2828
CompoundTag fileContents;
2929
try {
30+
- fileContents = NbtIo.readCompressed(dataLocation, NbtAccounter.defaultQuota());
31+
+ fileContents = NbtIo.readCompressed(dataLocation, NbtAccounter.create(net.minecraft.nbt.NbtAccounter.DEFAULT_NBT_QUOTA * 50L)); // Paper - raise quota to account for custom data
32+
} catch (IOException var6) {
33+
return DataResult.error(var6::getMessage);
34+
}
3035
@@ -396,7 +_,7 @@
3136

3237
public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(final String levelId) throws IOException, ContentValidationException {

0 commit comments

Comments
 (0)