Remove TE Fixer changes

Ultimately they should be unnecessary now that upstream's fix has been
in place for a while. Removing this reduces our own footprint, and gets
rid of any possible unintended behavior.
Dieser Commit ist enthalten in:
Zach Brown 2016-10-05 15:46:44 -05:00
Ursprung f4a336f40e
Commit 10469dfd46
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
18 geänderte Dateien mit 41 neuen und 160 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From e972102cd812e252b5ad14ae0254c4b060a50907 Mon Sep 17 00:00:00 2001
From fe188eddc55c94500583679f02ce99c1a45c4843 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 16 Jul 2016 19:11:17 -0500
Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
@ -18,5 +18,5 @@ index 989758c..1c619c5 100644
GameProfile gameprofile = new GameProfile(uuid, s);
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,119 +0,0 @@
From b9c0f03504ca656ebe63b673f857b6ef62759c30 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 25 Jun 2016 23:55:56 -0500
Subject: [PATCH] Don't try and fix TileEntities as they are removed
Currently, CraftBukkit tries to fix TEs that do not match the present block at the location. This is normally good,
however, this same fixer runs when the TE removal functions go through to remove a TE after its block has been changed.
So a block will be changed, the server will attempt to remove the TE present, but will then get caught up in CB's overzealous
TE fixer. That fixer checks the block against the TE present, and throws a fit because it doesn't match. Which is why we're
removing it in the first place.
The 'fix' to this issue is to skip the fixer entirely when we're removing the TE, as it shouldn't ever need to run
then anyway, we're removing it.
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
index a5f2fc0..ef525ea 100644
--- a/src/main/java/net/minecraft/server/BlockChest.java
+++ b/src/main/java/net/minecraft/server/BlockChest.java
@@ -288,7 +288,7 @@ public class BlockChest extends BlockTileEntity {
}
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
- TileEntity tileentity = world.getTileEntity(blockposition);
+ TileEntity tileentity = world.getTileEntity(blockposition, true); // Paper - This is being removed, don't fix
if (tileentity instanceof IInventory) {
InventoryUtils.dropInventory(world, blockposition, (IInventory) tileentity);
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index 024ce36..c423663 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -144,7 +144,7 @@ public class BlockDispenser extends BlockTileEntity {
}
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
- TileEntity tileentity = world.getTileEntity(blockposition);
+ TileEntity tileentity = world.getTileEntity(blockposition, true); // Paper - This is being removed, don't fix
if (tileentity instanceof TileEntityDispenser) {
InventoryUtils.dropInventory(world, blockposition, (TileEntityDispenser) tileentity);
diff --git a/src/main/java/net/minecraft/server/BlockFurnace.java b/src/main/java/net/minecraft/server/BlockFurnace.java
index 25f7b4b..898be91 100644
--- a/src/main/java/net/minecraft/server/BlockFurnace.java
+++ b/src/main/java/net/minecraft/server/BlockFurnace.java
@@ -109,7 +109,7 @@ public class BlockFurnace extends BlockTileEntity {
public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
if (!BlockFurnace.c) {
- TileEntity tileentity = world.getTileEntity(blockposition);
+ TileEntity tileentity = world.getTileEntity(blockposition, true); // Paper - This is being removed, don't fix
if (tileentity instanceof TileEntityFurnace) {
InventoryUtils.dropInventory(world, blockposition, (TileEntityFurnace) tileentity);
diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java
index 404793a..0d4d29b 100644
--- a/src/main/java/net/minecraft/server/BlockSkull.java
+++ b/src/main/java/net/minecraft/server/BlockSkull.java
@@ -122,7 +122,7 @@ public class BlockSkull extends BlockTileEntity {
// if (!((Boolean) iblockdata.get(BlockSkull.NODROP)).booleanValue()) {
if (false) {
// CraftBukkit end
- TileEntity tileentity = world.getTileEntity(blockposition);
+ TileEntity tileentity = world.getTileEntity(blockposition, true); // Paper - This is being removed, don't fix
if (tileentity instanceof TileEntitySkull) {
TileEntitySkull tileentityskull = (TileEntitySkull) tileentity;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f7d9a7c..383eef2 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2071,8 +2071,14 @@ public abstract class World implements IBlockAccess {
}
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
+ // Paper start - Add additional param so we can ignore fixing on removals
@Nullable
public TileEntity getTileEntity(BlockPosition blockposition) {
+ return getTileEntity(blockposition, false);
+ }
+
+ public TileEntity getTileEntity(BlockPosition blockposition, boolean isRemoving) {
+ // Paper end
if (blockposition.isInvalidYLocation()) { // Paper
return null;
} else {
@@ -2149,7 +2155,7 @@ public abstract class World implements IBlockAccess {
}
public void s(BlockPosition blockposition) {
- TileEntity tileentity = this.getTileEntity(blockposition);
+ TileEntity tileentity = this.getTileEntity(blockposition, true); // Paper - This is being removed, don't fix
if (tileentity != null && this.M) {
tileentity.y();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 87abf7f..5ed6d3e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -123,8 +123,16 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// CraftBukkit start
@Override
+ // Paper start - Add additional param so we can ignore fixing on removals
public TileEntity getTileEntity(BlockPosition pos) {
- TileEntity result = super.getTileEntity(pos);
+ return getTileEntity(pos, false);
+ }
+
+ @Override
+ public TileEntity getTileEntity(BlockPosition pos, boolean isRemoving) {
+ TileEntity result = super.getTileEntity(pos, isRemoving);
+ if (isRemoving) return result;
+ // Paper end
Block type = getType(pos).getBlock();
if (type == Blocks.CHEST || type == Blocks.TRAPPED_CHEST) { // Spigot
--
2.10.0.windows.1

Datei anzeigen

@ -1,11 +1,11 @@
From 559fff38085830930c7e8c381e505aafb7cec4d8 Mon Sep 17 00:00:00 2001
From fa32cabbc0e1c0a33e370ba2732f40c7f06823f9 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Jul 2016 17:58:53 -0500
Subject: [PATCH] More informative vehicle moved wrongly message
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9911265..90f2247 100644
index b6dfffc..972b85b 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -343,7 +343,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -18,5 +18,5 @@ index 9911265..90f2247 100644
entity.setLocation(d3, d4, d5, f, f1);
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From b7fff98e508a6e9bcb41fb6d11e6328d4a7de102 Mon Sep 17 00:00:00 2001
From 43cab707048fcf57959710da853803e5c7b0f1e1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 31 Jul 2016 16:33:03 -0500
Subject: [PATCH] Re-track players that dismount from other players
@ -23,5 +23,5 @@ index d084fc2..ec3a60a 100644
}
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,11 +1,11 @@
From 6b5df38a5b989dff9296d93f1c27f18559b22cd9 Mon Sep 17 00:00:00 2001
From c8174cd77412dae0abef65ec95504e78645689fb Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com>
Date: Fri, 5 Aug 2016 01:03:08 +0200
Subject: [PATCH] Add setting for proxy online mode status
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 82e6365..f40440f 100644
index ecf18eb..91546b6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -220,4 +220,9 @@ public class PaperConfig {
@ -47,5 +47,5 @@ index 100142e..4fb9c5e 100644
profile = console.getUserCache().getProfile( name );
}
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From f4ce497b75a49f07923d20fe17383d5e90133202 Mon Sep 17 00:00:00 2001
From a1bfad07929148b106e494ae6e1ae158f987755c Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 19 Aug 2016 01:52:56 +0100
Subject: [PATCH] Optimise BlockStateEnum hashCode and equals
@ -58,5 +58,5 @@ index 288c52c..66c459d 100644
public static <T extends Enum<T> & INamable> BlockStateEnum<T> of(String s, Class<T> oclass) {
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From f2cbfdf2075c15a632cecaa3d7885a7479ef9c95 Mon Sep 17 00:00:00 2001
From 1bb2986f9b28b8ce72d4edcd0c202190261856c6 Mon Sep 17 00:00:00 2001
From: killme <killme-git@ibts.me>
Date: Tue, 30 Aug 2016 16:39:48 +0200
Subject: [PATCH] Disable ticking of snow blocks
@ -34,5 +34,5 @@ index 1c43a37..a3b1998 100644
+ //Paper end
}
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From d99c319cab6c38f3ca1eb048cd23af14d66a25a6 Mon Sep 17 00:00:00 2001
From 87609705a4c0c86119a8deeb7f4b31325cca030a Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 1 Sep 2016 09:51:31 +0000
Subject: [PATCH] Convert new health to a float during set
@ -18,5 +18,5 @@ index b807a3f..9e19e7c 100644
// Paper - Be more informative
throw new IllegalArgumentException("Health must be between 0 and " + getMaxHealth() + ", but was " + health
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8debac859916f49cb64523bc834de01bb25baeb9 Mon Sep 17 00:00:00 2001
From c0bf573cbb3f25ec137f12dcfccf400e38debba2 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sun, 4 Sep 2016 16:35:43 -0500
Subject: [PATCH] Fix AIOOBE in inventory handling
@ -18,5 +18,5 @@ index 972b85b..50b23ed 100644
} else {
Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.b());
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 773bff8a1da3bc233cf712731981aa3020669410 Mon Sep 17 00:00:00 2001
From 09d45262f0de84815a53417f657bdb605018887b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
Subject: [PATCH] Configurable packet in spam threshold
@ -44,5 +44,5 @@ index 50b23ed..29653cf 100644
limitedPackets = 0;
return true;
--
2.10.0.windows.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From e5c7d5f9e92d0e35a180fd8776fc9d2a2734b360 Mon Sep 17 00:00:00 2001
From 5277018aa6deb3c472fb9a31375dd52d7380d8c6 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Tue, 20 Sep 2016 00:58:01 +0000
Subject: [PATCH] Configurable flying kick messages
@ -43,5 +43,5 @@ index 29653cf..7bac585 100644
}
} else {
--
2.5.0
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 32c1bb9c17914f7cc61e21e39f1fa31520ac069a Mon Sep 17 00:00:00 2001
From edb088fcf6a8ab77306a2007ca7137c52616a656 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements
@ -119,10 +119,10 @@ index 8ca8fbf..c19bde9 100644
this.methodProfiler.a("tallying");
this.h[this.ticks % 100] = System.nanoTime() - i;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 5ed6d3e..26ab536 100644
index 87abf7f..ed3805d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1024,12 +1024,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1016,12 +1016,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
if (chunkproviderserver.e()) {
@ -138,5 +138,5 @@ index 5ed6d3e..26ab536 100644
iprogressupdate.c("Saving chunks");
}
--
1.9.1
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 13e68d27421f3691be5abae087a12fe87612a032 Mon Sep 17 00:00:00 2001
From 759bf7de29d799f60c5c2abe6594ff4fdac06d3c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes
@ -8,7 +8,7 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 383eef2..b026e2b 100644
index f7d9a7c..9eaab84 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1761,7 +1761,7 @@ public abstract class World implements IBlockAccess {
@ -21,5 +21,5 @@ index 383eef2..b026e2b 100644
if (!entity.ab || entity.ac != k || entity.ad != l || entity.ae != i1) {
--
2.9.3
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 1db407564fbdd4f31b348c62f11b15be0eb27c7c Mon Sep 17 00:00:00 2001
From a00026a267f7b82fd9fa666b008a5e2f2e4f84d7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 22:31:18 -0400
Subject: [PATCH] Process NMS Data Conversion post ItemMeta on Copy
@ -61,5 +61,5 @@ index 88f0292..7f77d44 100644
}
--
2.9.3
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 3766c64b653c0ddc3b3688acf16029ded14bbcff Mon Sep 17 00:00:00 2001
From 9392526a42291798757abda1942e41d5fc2d8ef8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 16 Jun 2016 00:17:23 -0400
Subject: [PATCH] Remove FishingHook reference on Craft Entity removal
@ -26,5 +26,5 @@ index ecfc316..3f909c1 100644
public LivingEntity _INVALID_getShooter() {
return (LivingEntity) getShooter();
--
2.9.3
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 97c0a0a4d4ca2797ea4b10bfad875c777379d66b Mon Sep 17 00:00:00 2001
From dd9660855df152cd179f5c3a21c7ab645b70ece5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:48:39 -0400
Subject: [PATCH] Auto fix bad Y levels on player login

Datei anzeigen

@ -1,4 +1,4 @@
From bf6bbe6de6123f41a7a3b879bef3bfa0be290e24 Mon Sep 17 00:00:00 2001
From 37b1119fcaf9a311e2cd20262498d11e598466f6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 23:54:20 -0400
Subject: [PATCH] Raise string limit for packet serialization
@ -23,5 +23,5 @@ index b056457..662bd1e 100644
this.d(abyte.length);
this.writeBytes(abyte);
--
2.9.3
2.10.0

Datei anzeigen

@ -1,4 +1,4 @@
From 8e28660b4ee39ff1513a7aed26639e343bc7050e Mon Sep 17 00:00:00 2001
From 0de0dd7bad529706df1d5266a83f8fa7162eda1a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 26 Sep 2016 01:51:30 -0400
Subject: [PATCH] Disable Vanilla Chunk GC
@ -6,10 +6,10 @@ Subject: [PATCH] Disable Vanilla Chunk GC
Bukkit has its own system for this.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 26ab536..777a5df 100644
index ed3805d..a1350b0 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1036,7 +1036,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1028,7 +1028,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.a(flag);
// CraftBukkit - ArrayList -> Collection
@ -18,7 +18,7 @@ index 26ab536..777a5df 100644
Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) {
@@ -1045,7 +1045,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1037,7 +1037,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) {
chunkproviderserver.unload(chunk);
}
@ -29,5 +29,5 @@ index 26ab536..777a5df 100644
}
}
--
1.9.1
2.10.0