mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
update paper
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Add canSaveToDisk to Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e617f1acd2d73c35d293580b27bbd9a49b569e21..73d1efb6eb6a96368db57f316867cfc027159056 100644
|
||||
index 41efb6fb0d26e62229a5d5cfae2dc36b2d3b718e..ce2fe8ac56b3471bbd6a0e2a4b7680b420f3a1c8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4058,5 +4058,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -4056,5 +4056,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
public boolean processClick(InteractionHand hand) {
|
||||
return false;
|
||||
}
|
||||
@@ -19,14 +19,14 @@ index e617f1acd2d73c35d293580b27bbd9a49b569e21..73d1efb6eb6a96368db57f316867cfc0
|
||||
// Purpur end
|
||||
}
|
||||
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..29f1ae2df9bd792e7d77479432ae48b0d070586b 100644
|
||||
index 572a013445bd83d366cce27d0e015ba8271df7e0..bba780934f4bb05bdb5ff8e69dc615a6b555b2f0 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
|
||||
@@ -90,6 +90,7 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
} else {
|
||||
@@ -91,6 +91,7 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
ListTag listTag = new ListTag();
|
||||
final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper
|
||||
dataList.getEntities().forEach((entity) -> {
|
||||
+ if (!entity.canSaveToDisk()) return; // Purpur
|
||||
CompoundTag compoundTag = new CompoundTag();
|
||||
if (entity.save(compoundTag)) {
|
||||
listTag.add(compoundTag);
|
||||
// Paper start
|
||||
final EntityType<?> entityType = entity.getType();
|
||||
final int saveLimit = this.level.paperConfig.entityPerChunkSaveLimits.getOrDefault(entityType, -1);
|
||||
|
||||
Reference in New Issue
Block a user