Yatopia/patches/server/0039-Don-t-save-Fireworks-and-Arrows.patch

27 lines
1.0 KiB
Diff
Raw Normal View History

2020-03-21 17:29:35 +01:00
From 42b73c07d1ef71fd082f14c8eb6682817d33ea68 Mon Sep 17 00:00:00 2001
2020-02-26 21:44:51 +01:00
From: tr7zw <tr7zw@live.de>
Date: Wed, 26 Feb 2020 21:39:58 +0100
Subject: [PATCH] Don't save Fireworks and Arrows
---
src/main/java/net/minecraft/server/Entity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
2020-03-21 17:29:35 +01:00
index 181f1742..d2a224a8 100644
2020-02-26 21:44:51 +01:00
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
2020-03-21 17:29:35 +01:00
@@ -1616,7 +1616,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
2020-02-26 21:44:51 +01:00
}
public boolean c(NBTTagCompound nbttagcompound) {
- String s = this.getSaveID();
+ if(this instanceof EntityFireworks || this instanceof EntityArrow)return false; // YAPFA
+ String s = this.getSaveID();
if (this.persist && !this.dead && s != null) { // CraftBukkit - persist flag
nbttagcompound.setString("id", s);
--
2.25.1.windows.1