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

21 lines
971 B
Diff
Raw Normal View History

2020-07-17 18:05:50 +02:00
From 0000000000000000000000000000000000000000 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
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
2020-07-17 18:05:50 +02:00
index 3db19a9bab8ffdc42f280a27c867bf7d1a1ab9e7..9430cda80517b736aa07b8e57a1ae0f9f895f32d 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-07-05 16:50:40 +02:00
@@ -1714,7 +1714,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
2020-02-26 21:44:51 +01:00
}
public boolean a_(NBTTagCompound nbttagcompound) {
2020-02-26 21:44:51 +01:00
- 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);