mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@9f1fa0b Fix item gravity on inactive items, remove dumb active skipping PaperMC/Paper@1a1d0cf Use target pitch in teleport (generally the same thing) PaperMC/Paper@8ba3073 fix "is_freezing" damage type tag PaperMC/Paper@1523212 don't resend effects when PlayerItemConsumeEvent is cancelled PaperMC/Paper@1330880 Add Friction API to minecarts PaperMC/Paper@580a610 Allow using old ender pearl behavior & apply ender pearl exploit patch (#11524) PaperMC/Paper@40a960d Rebuild patches PaperMC/Paper@dfedf79 Correctly cancel consumption of consumable PaperMC/Paper@147b796 get previous redstone level from the right state for experimental wires PaperMC/Paper@ad9c58e Only expose velocity relative tp flags to API (#11532) PaperMC/Paper@f273e6e Set updatingMinecraft to false PaperMC/Paper@c5c1250 [ci skip] Remove leftover todo file (#11540) PaperMC/Paper@7ee4835 Correctly clear explosion density cache(#11541) PaperMC/Paper@52a0590 Updated Upstream (Bukkit/CraftBukkit) (#11543) PaperMC/Paper@5c0930d Fix fix recipe iterator patch PaperMC/Paper@1de0130 re-add a dispense fix patch PaperMC/Paper@16d7d73 bunch more general fixes PaperMC/Paper@a5d7426 Correctly support RecipeChoice.empty (#11550) PaperMC/Paper@85c870e Correct update cursor (#11554) PaperMC/Paper@d19be64 Fix NPE with spark when CraftServer is not init yet (#11558) PaperMC/Paper@92131ad Decrease dead entity teleport warning (#11559)
This commit is contained in:
86
patches/server/0053-Add-canSaveToDisk-to-Entity.patch
Normal file
86
patches/server/0053-Add-canSaveToDisk-to-Entity.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 907d4661f123ae04c06c9fff8ebdf0b528ed21ba..863780d37c804fc7a085f540af2b70491c570877 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -611,6 +611,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
}
|
||||
// Paper end - optimise entity tracker
|
||||
+ // Purpur start
|
||||
+ public boolean canSaveToDisk() {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
index a1f25efb38eff32aaabe892ddbc9a60426923686..e0f25b057b7b908a10038d9e9695a500aa883c75 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/WitherSkull.java
|
||||
@@ -121,6 +121,11 @@ public class WitherSkull extends AbstractHurtingProjectile {
|
||||
// do not hit rider
|
||||
return target != this.getRider() && super.canHitEntity(target);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean canSaveToDisk() {
|
||||
+ return false;
|
||||
+ }
|
||||
// Purpur end
|
||||
|
||||
@Override
|
||||
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 356d010506fd21f3c752e4aa86c46c1106fdde3b..86e16dd6b905af31795fda8002f2e1f857ddcb9f 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
|
||||
@@ -106,6 +106,7 @@ public class EntityStorage implements EntityPersistentStorage<Entity> {
|
||||
}
|
||||
// Paper end - Entity load/save limit per chunk
|
||||
CompoundTag compoundTagx = new CompoundTag();
|
||||
+ if (!entity.canSaveToDisk()) return; // Purpur
|
||||
if (entity.save(compoundTagx)) {
|
||||
listTag.add(compoundTagx);
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java b/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java
|
||||
index 89c476c740b4efb4f44c1dcd384b908626d96780..f25abee6dbf99c8d08f8e09db02b41df86115faa 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/entity/DolphinSpit.java
|
||||
@@ -36,6 +36,13 @@ public class DolphinSpit extends LlamaSpit {
|
||||
dolphin.getZ() + (double) (dolphin.getBbWidth() + 1.0F) * 0.5D * (double) Mth.cos(dolphin.yBodyRot * 0.017453292F));
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean canSaveToDisk() {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public void tick() {
|
||||
super_tick();
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java b/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java
|
||||
index d7f5686fe897f3c2424b146c8e7d2862223d1eaf..58957b0bd3cd2c37fd4a6766a02e2506d9f51010 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/entity/PhantomFlames.java
|
||||
@@ -38,6 +38,13 @@ public class PhantomFlames extends LlamaSpit {
|
||||
phantom.getZ() + (double) (phantom.getBbWidth() + 1.0F) * 0.5D * (double) Mth.cos(phantom.yBodyRot * 0.017453292F));
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean canSaveToDisk() {
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
public void tick() {
|
||||
super_tick();
|
||||
|
||||
Reference in New Issue
Block a user