mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly Paper Changes: cc001a73b Climbing should not bypass cramming gamerule b9930b39d Add legacy plugin count to metrics 4729e6b90 Add more lightning API 5e220bcb5 [ci skip] add stale bot configuration 2a44498a5 Add PlayerItemCooldownEvent fd33bcee1 Add LivingEntity#clearActiveItem a99e0ca05 Fix Player spawnParticle x/y/z precision loss
This commit is contained in:
35
patches/server/0074-Add-canSaveToDisk-to-Entity.patch
Normal file
35
patches/server/0074-Add-canSaveToDisk-to-Entity.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 18 Feb 2020 20:07:08 -0600
|
||||
Subject: [PATCH] Add canSaveToDisk to Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 3628b04fc4..b40cb0c7b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -532,6 +532,7 @@ public class ChunkRegionLoader {
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
Entity entity = (Entity) iterator1.next();
|
||||
+ if (!entity.canSaveToDisk()) continue; // Purpur
|
||||
if (worldserver.paperConfig.projectileSaveLimit > -1 && (entity instanceof IProjectile || entity instanceof EntityEnderSignal)) {
|
||||
final EntityTypes<?> projectileType = entity.getEntityType();
|
||||
if (savedProjectileCounts.getOrDefault(projectileType, 0) >= worldserver.paperConfig.projectileSaveLimit) {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 35ed7f6742..d908e182b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -308,6 +308,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.headHeight = this.getHeadHeight(EntityPose.STANDING, this.size);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ public boolean canSaveToDisk() {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public boolean isSpectator() {
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user