mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
Update Entity load/save limit per chunk
This commit is contained in:
parent
9bebf0b6f8
commit
3353754726
@ -1,93 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: jmp <jasonpenilla2@me.com>
|
||||
Date: Wed, 18 Nov 2020 20:52:25 -0800
|
||||
Subject: [PATCH] Entity load/save limit per chunk
|
||||
|
||||
Adds a config option to limit the number of entities saved and loaded
|
||||
to a chunk. The default values of -1 disable the limit. Although
|
||||
defaults are only included for certain entites, this allows setting
|
||||
limits for any entity type.
|
||||
|
||||
1.17: looks like tracking the count on loading should work fine just putting it in the EntityType#loadEntitiesRecursive, but
|
||||
the tracking count on save needs some more work to implement.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 7ebc85264a2cbfb601dfe5472b561cac1a7cf8bf..486e5438254348db68017228af131cba7defd637 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -7,6 +7,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.world.Difficulty;
|
||||
+import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.monster.Vindicator;
|
||||
import net.minecraft.world.entity.monster.Zombie;
|
||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
||||
@@ -762,4 +763,18 @@ public class PaperWorldConfig {
|
||||
Difficulty.class
|
||||
);
|
||||
}
|
||||
+
|
||||
+ public Map<EntityType<?>, Integer> entityPerChunkSaveLimits = new HashMap<>();
|
||||
+ private void entityPerChunkSaveLimits() {
|
||||
+ getInt("entity-per-chunk-save-limit.experience_orb", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.snowball", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.ender_pearl", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.arrow", -1);
|
||||
+ EntityType.getEntityNameList().forEach(name -> {
|
||||
+ final EntityType<?> type = EntityType.getByName(name.getPath()).orElseThrow(() -> new IllegalStateException("Unknown Entity Type: " + name.toString()));
|
||||
+ final String path = ".entity-per-chunk-save-limit." + name.getPath();
|
||||
+ final int value = config.getInt("world-settings." + worldName + path, config.getInt("world-settings.default" + path, -1)); // get without setting defaults
|
||||
+ if (value != -1) entityPerChunkSaveLimits.put(type, value);
|
||||
+ });
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
index f6a814f9305813eaafa56baa0327e0111cd4e38c..30f80f8549c3236d6bfe594e323e4ca6e702005d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
|
||||
@@ -539,11 +539,22 @@ public class ChunkSerializer {
|
||||
|
||||
chunk.setLastSaveHadEntities(false);
|
||||
|
||||
+ // Paper start
|
||||
+ final Map<EntityType<?>, Integer> savedEntityCounts = Maps.newHashMap();
|
||||
for (int j = 0; j < chunk.getEntitySlices().length; ++j) {
|
||||
Iterator iterator1 = chunk.getEntitySlices()[j].iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
Entity entity = (Entity) iterator1.next();
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = worldserver.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
+ if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ savedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
CompoundTag nbttagcompound4 = new CompoundTag();
|
||||
// Paper start
|
||||
if (asyncsavedata == null && !entity.removed && (int) Math.floor(entity.getX()) >> 4 != chunk.getPos().x || (int) Math.floor(entity.getZ()) >> 4 != chunk.getPos().z) {
|
||||
@@ -674,10 +685,21 @@ public class ChunkSerializer {
|
||||
ListTag nbttaglist = tag.getList("Entities", 10);
|
||||
Level world = chunk.getLevel();
|
||||
|
||||
+ // Paper start
|
||||
+ final Map<EntityType<?>, Integer> loadedEntityCounts = Maps.newHashMap();
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
CompoundTag nbttagcompound1 = nbttaglist.getCompound(i);
|
||||
|
||||
EntityType.loadEntityRecursive(nbttagcompound1, world, (entity) -> {
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = world.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
+ if (loadedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ loadedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
chunk.addEntity(entity);
|
||||
return entity;
|
||||
});
|
96
patches/server/0647-Entity-load-save-limit-per-chunk.patch
Normal file
96
patches/server/0647-Entity-load-save-limit-per-chunk.patch
Normal file
@ -0,0 +1,96 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: jmp <jasonpenilla2@me.com>
|
||||
Date: Wed, 18 Nov 2020 20:52:25 -0800
|
||||
Subject: [PATCH] Entity load/save limit per chunk
|
||||
|
||||
Adds a config option to limit the number of entities saved and loaded
|
||||
to a chunk. The default values of -1 disable the limit. Although
|
||||
defaults are only included for certain entites, this allows setting
|
||||
limits for any entity type.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 79687b8add9e4768d2c9aa1efdad7cc9736ef22c..54c74b8d3056e512b4a8c1760c45a33ab7a6f4a9 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.destroystokyo.paper;
|
||||
|
||||
import java.util.Arrays;
|
||||
+import java.util.HashMap;
|
||||
import java.util.List;
|
||||
+import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.world.Difficulty;
|
||||
+import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.monster.Vindicator;
|
||||
import net.minecraft.world.entity.monster.Zombie;
|
||||
import com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray.EngineMode;
|
||||
@@ -123,6 +126,20 @@ public class PaperWorldConfig {
|
||||
);
|
||||
}
|
||||
|
||||
+ public Map<EntityType<?>, Integer> entityPerChunkSaveLimits = new HashMap<>();
|
||||
+ private void entityPerChunkSaveLimits() {
|
||||
+ getInt("entity-per-chunk-save-limit.experience_orb", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.snowball", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.ender_pearl", -1);
|
||||
+ getInt("entity-per-chunk-save-limit.arrow", -1);
|
||||
+ EntityType.getEntityNameList().forEach(name -> {
|
||||
+ final EntityType<?> type = EntityType.getByName(name.getPath()).orElseThrow(() -> new IllegalStateException("Unknown Entity Type: " + name.toString()));
|
||||
+ final String path = ".entity-per-chunk-save-limit." + name.getPath();
|
||||
+ final int value = config.getInt("world-settings." + worldName + path, config.getInt("world-settings.default" + path, -1)); // get without setting defaults
|
||||
+ if (value != -1) entityPerChunkSaveLimits.put(type, value);
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
public short keepLoadedRange;
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
index 536d979139326191d1199e93e9fc885164766aec..c7f50d45b3a0a238e41e5a024cd4dec08e07c8b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
|
||||
@@ -561,9 +561,20 @@ public class EntityType<T extends Entity> implements EntityTypeTest<Entity, T> {
|
||||
final Spliterator<? extends net.minecraft.nbt.Tag> spliterator = entityNbtList.spliterator();
|
||||
|
||||
return StreamSupport.stream(new Spliterator<Entity>() {
|
||||
+ final Map<EntityType<?>, Integer> loadedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
public boolean tryAdvance(Consumer<? super Entity> consumer) {
|
||||
return spliterator.tryAdvance((nbtbase) -> {
|
||||
EntityType.loadEntityRecursive((CompoundTag) nbtbase, world, (entity) -> {
|
||||
+ // Paper start
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = world.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
+ if (this.loadedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ this.loadedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
consumer.accept(entity);
|
||||
return entity;
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
index 6204c6c9cf2cb620e41105889807f85438bd006c..572a013445bd83d366cce27d0e015ba8271df7e0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
@@ -89,7 +89,18 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
|
||||
} else {
|
||||
ListTag listTag = new ListTag();
|
||||
+ final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
dataList.getEntities().forEach((entity) -> {
|
||||
+ // Paper start
|
||||
+ final EntityType<?> entityType = entity.getType();
|
||||
+ final int saveLimit = this.level.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
|
||||
+ if (saveLimit > -1) {
|
||||
+ if (savedEntityCounts.getOrDefault(entityType, 0) >= saveLimit) {
|
||||
+ return;
|
||||
+ }
|
||||
+ savedEntityCounts.merge(entityType, 1, Integer::sum);
|
||||
+ }
|
||||
+ // Paper end
|
||||
CompoundTag compoundTag = new CompoundTag();
|
||||
if (entity.save(compoundTag)) {
|
||||
listTag.add(compoundTag);
|
@ -5,7 +5,7 @@ Subject: [PATCH] call PortalCreateEvent players and end platform
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 8f0cf4297015f3cbe709e2eb82280cac72489925..22ea0da3836b61bb018ae974d2b8c7546b9528d6 100644
|
||||
index b98316165c6d10945ccc9e5e0c3f0be9cfc3e889..84eca485a09c6d147f3baa277e398de58a9dc147 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -523,6 +523,7 @@ public class BlockPos extends Vec3i {
|
||||
@ -17,7 +17,7 @@ index 8f0cf4297015f3cbe709e2eb82280cac72489925..22ea0da3836b61bb018ae974d2b8c754
|
||||
return this.set(this.getX() + dx, this.getY() + dy, this.getZ() + dz);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2fa2ba45fa1d79d9c78d80cca2aeebedad5a9ba0..b131e307056f04be14917ab92b1688b4fa2832cd 100644
|
||||
index 654befb6433647c701ef7966fd37baea3c2ba39b..57e2a6af2bc9e08797e3d06262d4af4bd156f34b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1167,15 +1167,21 @@ public class ServerPlayer extends Player {
|
@ -44,7 +44,7 @@ index 6b4163f5601a0961055c8451ec7ef2204938cf69..c54a37516ef1d8a76f7161917bf44812
|
||||
@Override
|
||||
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index 2257391ad42219efda0b6a11f1ca0f66e377e412..1ffe939bb66358391d92d3e5378865b1cc8690fd 100644
|
||||
index 6dbf806b5984ae16e747dce350c7cffcf0b190ad..f17ed24cee2ac9a9ba5d9a02c1cf8c92ee7fe8db 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
@@ -145,7 +145,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
@ -45,7 +45,7 @@ index d75f78d2e3fb1376e8f6a8668c98a04a693c99e1..79f6089b934124c3309c6bee2e48b36b
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b131e307056f04be14917ab92b1688b4fa2832cd..b4055c6de62c22ba8ee8384884f9b3fd62eddeb8 100644
|
||||
index 57e2a6af2bc9e08797e3d06262d4af4bd156f34b..5d3269c6912a23aef26d5b155c04c2cd567cefba 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1784,8 +1784,15 @@ public class ServerPlayer extends Player {
|
||||
@ -136,7 +136,7 @@ index 0b2cb820b912ddb6366f7ffb79c71047d03f2001..52294f5cfce86faf301c835bf1a9c2a5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ee40e03704bb8c6b3aa990542fc852058d00f081..0329a727b71e56195a55c69edfd3502fb322e572 100644
|
||||
index e5a2fcd390ab5b41d7e482d486cef42a9eef94f5..6e3bebdb7667bfd39c608412b55f7ec7732e1f7d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1249,7 +1249,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -263,7 +263,7 @@ index cf0a74b8a1c31d4bc493eb09a69ee2bd94cb6485..6fa1a7da70896d0ff34d38698769195a
|
||||
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, worlds, eraseCache);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8ab99b04ef3e85b64ea78680aa85df1a0894399f..43f9143e892111aa9901454b3de7b57945ecb707 100644
|
||||
index c567d8a80fb9caca186bd4c4a7f5199a3eb6f494..c582610142e9f8568c330c7c804926b9ccdaec09 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -562,13 +562,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -297,7 +297,7 @@ index 8ab99b04ef3e85b64ea78680aa85df1a0894399f..43f9143e892111aa9901454b3de7b579
|
||||
|
||||
if (dimensionKey == LevelStem.OVERWORLD) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 11b454836610f07fffc0efcb60ac5960757a0644..5635b1049f950b8520f527b015c9404c80f5d86c 100644
|
||||
index 54cac6167796360ddaeb0b968f17a3533c4b9775..aa4969ea486c8654228d96e48a2192500ee78a63 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -174,6 +174,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Limit item frame cursors on maps
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index fcae27a0149e2d135faefcdb135e817190ceb44b..4a5dd2527fce021e7d69d7509c3abfe39deab235 100644
|
||||
index 54c74b8d3056e512b4a8c1760c45a33ab7a6f4a9..cc0946050383d00f1f46f16a5bc9236606bee638 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -760,5 +760,10 @@ public class PaperWorldConfig {
|
||||
@@ -777,5 +777,10 @@ public class PaperWorldConfig {
|
||||
private void allowUsingSignsInsideSpawnProtection() {
|
||||
allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection);
|
||||
}
|
||||
@ -20,7 +20,7 @@ index fcae27a0149e2d135faefcdb135e817190ceb44b..4a5dd2527fce021e7d69d7509c3abfe3
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index e90cb274ae07a259b90ec2badf35980ba684c5b1..ec4c0ebc1067fea9833f93bbbada69446aeee670 100644
|
||||
index 2e5155fe541ed7040a6be9fdec98b23e8c45bfb0..60d7496966b22e0553372a93e3c0e7ed9e166cba 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -296,8 +296,12 @@ public class MapItemSavedData extends SavedData {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerKickEvent causes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 43f9143e892111aa9901454b3de7b57945ecb707..1f29c92776aea8dbba52d4cb197addce5b3e4d5e 100644
|
||||
index c582610142e9f8568c330c7c804926b9ccdaec09..4c78ccd54d3780ea1ed7636a233dc6d3451ed0d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2110,7 +2110,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -351,7 +351,7 @@ index a9d6154cb9cd347306f745e752cabdf94ed61744..d6ecf7671663957b27ee0cadbfc57ce3
|
||||
// CraftBukkit end
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0329a727b71e56195a55c69edfd3502fb322e572..05007190441117fe8b2f8b54fc37e589ffc213dc 100644
|
||||
index 6e3bebdb7667bfd39c608412b55f7ec7732e1f7d..3f0096423ba5db02c1007a8547d8a0497597055f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -498,16 +498,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -13,7 +13,7 @@ contention situations.
|
||||
And this is extremely a low contention situation.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index b5b0dbbb21f15a61017d8fc936feed30c2b193dc..418eb1ec7dd407ec751b22aa6c7c96069c7eb2ff 100644
|
||||
index 66175691af9417275dee33bbc07c6826e807d571..79a6f43f6aa37362990b403695fcdd13f1a2a3ec 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
@@ -37,16 +37,18 @@ public class PalettedContainer<T> implements PaletteResize<T> {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4a5dd2527fce021e7d69d7509c3abfe39deab235..1ee76ca0df91a7d23882d8647539c5135593410c 100644
|
||||
index cc0946050383d00f1f46f16a5bc9236606bee638..a132f4a5dddf2c895712e5393dfe3d6d1656b6d1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -765,5 +765,10 @@ public class PaperWorldConfig {
|
||||
@@ -782,5 +782,10 @@ public class PaperWorldConfig {
|
||||
private void mapItemFrameCursorLimit() {
|
||||
mapItemFrameCursorLimit = getInt("map-item-frame-cursor-limit", mapItemFrameCursorLimit);
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals
|
||||
MC-108513
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 1ee76ca0df91a7d23882d8647539c5135593410c..9974151e3bcc7db9acf3f6adacb68331f6085824 100644
|
||||
index a132f4a5dddf2c895712e5393dfe3d6d1656b6d1..37d438d131bd66c46a650a48c70af1fde5665fc7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -770,5 +770,10 @@ public class PaperWorldConfig {
|
||||
@@ -787,5 +787,10 @@ public class PaperWorldConfig {
|
||||
private void fixItemsMergingThroughWalls() {
|
||||
fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls);
|
||||
}
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
||||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8c5bf69b89822c8211d472ba3b4b809fa436948a..aaaf5d49972ab608473637dc884dd0c802deaae0 100644
|
||||
index 2c25e5ca42a700e1be52781f605a1583df249b85..cfab75b70b4cf4c95f3a7971c78f6dc42c0d23d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -361,6 +361,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
@ -6,10 +6,10 @@ Subject: [PATCH] add per world spawn limits
|
||||
Taken from #2982. Credit to Chasewhip8
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 9974151e3bcc7db9acf3f6adacb68331f6085824..913b0a9b5a31aba4e28e1fe15d5d58b4c8edfc3c 100644
|
||||
index 37d438d131bd66c46a650a48c70af1fde5665fc7..b252fc8b88d380feede31f7bc3cca24b4452478b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -626,6 +626,19 @@ public class PaperWorldConfig {
|
||||
@@ -643,6 +643,19 @@ public class PaperWorldConfig {
|
||||
zombieVillagerInfectionChance = getDouble("zombie-villager-infection-chance", zombieVillagerInfectionChance);
|
||||
}
|
||||
|
@ -34,8 +34,6 @@ This should fix some problems converting old data, as the
|
||||
changes here are going to prevent the chunk from being regenerated
|
||||
incorrectly.
|
||||
|
||||
SPOTTEDLEAF!!!!!!!!!!!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java b/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java
|
||||
index 081bcae48ae34d8354635ea57952f09f14f7fa7a..a4305f58f793e1577de5e13132381ce81304cae4 100644
|
||||
--- a/src/main/java/net/minecraft/util/datafix/fixes/ChunkToProtochunkFix.java
|
Loading…
Reference in New Issue
Block a user