Fix null tile entity worlds crashing the server
This commit is contained in:
parent
daea0dc780
commit
3a120c167c
@ -1,4 +1,4 @@
|
|||||||
From 0690a27be201fcc940f79ed5ad636953a4a11b11 Mon Sep 17 00:00:00 2001
|
From 621472f2b2e720d3167f64288f1d8a5c293d85eb Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Wed, 2 Jul 2014 22:33:09 -0500
|
Date: Wed, 2 Jul 2014 22:33:09 -0500
|
||||||
Subject: [PATCH] Allow undead horse types to be leashed
|
Subject: [PATCH] Allow undead horse types to be leashed
|
@ -1,42 +0,0 @@
|
|||||||
From d3ac50de254102713cf758ecb7f0db8ae3d1f7cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Suddenly <suddenly@suddenly.coffee>
|
|
||||||
Date: Tue, 27 May 2014 14:00:41 +0100
|
|
||||||
Subject: [PATCH] Prevent null hopper owners crashing the server
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
||||||
index c7b3495..f7a6140 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
|
|
||||||
@@ -243,13 +243,23 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
|
||||||
if (!this.j() && BlockHopper.c(this.p())) {
|
|
||||||
boolean flag = false;
|
|
||||||
|
|
||||||
- if (!this.k()) {
|
|
||||||
- flag = this.x();
|
|
||||||
+ try { // PaperSpigot Start (Try/catch to prevent null owner crash)
|
|
||||||
+ if (!this.k()) {
|
|
||||||
+ flag = this.x();
|
|
||||||
+ }
|
|
||||||
+ } catch (NullPointerException e) {
|
|
||||||
+ this.getWorld().setAir(this.x, this.y, this.z);
|
|
||||||
+ org.bukkit.Bukkit.getLogger().log(java.util.logging.Level.WARNING, "Null owner found for hopper, removing hopper at {0} {1}, {2}, {3}", new Object[]{this.getWorld().getWorld().getName(), this.x, this.y, this.z});
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (!this.l()) {
|
|
||||||
- flag = suckInItems(this) || flag;
|
|
||||||
- }
|
|
||||||
+ try {
|
|
||||||
+ if (!this.l()) {
|
|
||||||
+ flag = suckInItems(this) || flag;
|
|
||||||
+ }
|
|
||||||
+ } catch (NullPointerException e) {
|
|
||||||
+ this.getWorld().setAir(this.x, this.y, this.z);
|
|
||||||
+ org.bukkit.Bukkit.getLogger().log(java.util.logging.Level.WARNING, "Null owner found for hopper, removing hopper at {0} {1}, {2}, {3}", new Object[]{this.getWorld().getWorld().getName(), this.x, this.y, this.z});
|
|
||||||
+ } // PaperSpigot End
|
|
||||||
|
|
||||||
if (flag) {
|
|
||||||
this.c(world.spigotConfig.hopperTransfer); // Spigot
|
|
||||||
--
|
|
||||||
1.9.1
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
|||||||
From 13c49b793dc7f89df0dbadf47cd8adc1e50233ed Mon Sep 17 00:00:00 2001
|
From 979777557af4917ab674148c1ea2a4a5421f015f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 17 May 2014 02:12:39 -0500
|
Date: Sat, 17 May 2014 02:12:39 -0500
|
||||||
Subject: [PATCH] Teleport passenger/vehicle with player
|
Subject: [PATCH] Teleport passenger/vehicle with player
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 0635c20..66bba33 100644
|
index a5d7e3d..9788ff5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -38,6 +38,13 @@ public abstract class Entity {
|
@@ -38,6 +38,13 @@ public abstract class Entity {
|
@ -1,4 +1,4 @@
|
|||||||
From 0bc497f464ddd1f2cf96ebbb7451ca0f022a2bc5 Mon Sep 17 00:00:00 2001
|
From 733a279ce93f83a19e6e0e8371f9415ba76b9dd2 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Sun, 18 May 2014 16:35:38 -0500
|
Date: Sun, 18 May 2014 16:35:38 -0500
|
||||||
Subject: [PATCH] Invisible players don't have rights
|
Subject: [PATCH] Invisible players don't have rights
|
||||||
@ -34,7 +34,7 @@ index 13903e9..b311508 100644
|
|||||||
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event
|
org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this); // CraftBukkit - Call event
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index a0a1dd1..3dc8cc7 100644
|
index 07eeb2b..3bb1302 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
|
@@ -14,6 +14,7 @@ import java.util.concurrent.Callable;
|
@ -1,4 +1,4 @@
|
|||||||
From 5561158e96616efbf02948081039b7059a9987e0 Mon Sep 17 00:00:00 2001
|
From 7491f2093ad5e937bfea09c51d22445436666eed Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Mon, 19 May 2014 19:30:58 -0500
|
Date: Mon, 19 May 2014 19:30:58 -0500
|
||||||
Subject: [PATCH] Configurable squid spawn ranges
|
Subject: [PATCH] Configurable squid spawn ranges
|
@ -1,4 +1,4 @@
|
|||||||
From 1fe3879c6a6f418f4fdfde6a90d901911594e75a Mon Sep 17 00:00:00 2001
|
From cdc8e9f58ce44646880bc7c4a8e7b23749feac93 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 24 Jun 2014 07:39:37 -0500
|
Date: Tue, 24 Jun 2014 07:39:37 -0500
|
||||||
Subject: [PATCH] Configurable damage multiplier for PvP blocking
|
Subject: [PATCH] Configurable damage multiplier for PvP blocking
|
@ -1,4 +1,4 @@
|
|||||||
From 4a4bbb0cb896d1d224da7e5b319061ecf14fdfce Mon Sep 17 00:00:00 2001
|
From 624ff1fcdeb31bf1df7b2497468cd781a3a7dabc Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 24 Jun 2014 07:44:59 -0500
|
Date: Tue, 24 Jun 2014 07:44:59 -0500
|
||||||
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
@ -1,4 +1,4 @@
|
|||||||
From 2c96e2400eb7acaba33dedba40d03ee418e731ad Mon Sep 17 00:00:00 2001
|
From eed18c564df768143b11e068f8c8b94ccb0813ba Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Wed, 21 May 2014 15:35:12 -0500
|
Date: Wed, 21 May 2014 15:35:12 -0500
|
||||||
Subject: [PATCH] Configurable baby zombie movement speed
|
Subject: [PATCH] Configurable baby zombie movement speed
|
@ -1,4 +1,4 @@
|
|||||||
From 010964894e41934c2fba1bde8885bfb6495da2ff Mon Sep 17 00:00:00 2001
|
From a6a3f52729f019c6a6ff62426c1f8dd9f3a8f45a Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Fri, 30 May 2014 19:42:50 -0500
|
Date: Fri, 30 May 2014 19:42:50 -0500
|
||||||
Subject: [PATCH] Make destroyed boats drop the boat item
|
Subject: [PATCH] Make destroyed boats drop the boat item
|
@ -1,4 +1,4 @@
|
|||||||
From cb94917c459a2c94181d931cefcf62cd4cbc0ce5 Mon Sep 17 00:00:00 2001
|
From 57a5b0a6c6722b078e43896f3e65180f4c6a04d6 Mon Sep 17 00:00:00 2001
|
||||||
From: gsand <gsandowns@gmail.com>
|
From: gsand <gsandowns@gmail.com>
|
||||||
Date: Sun, 6 Jul 2014 02:46:20 -0500
|
Date: Sun, 6 Jul 2014 02:46:20 -0500
|
||||||
Subject: [PATCH] Inverted Daylight Detector Toggle
|
Subject: [PATCH] Inverted Daylight Detector Toggle
|
@ -1,4 +1,4 @@
|
|||||||
From dc1e612cabecd5b17f67e25ae052cd114283e054 Mon Sep 17 00:00:00 2001
|
From d8cb8c3059df51f9f7041152da955f267f85ccdc Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 10 Jun 2014 18:22:19 -0500
|
Date: Tue, 10 Jun 2014 18:22:19 -0500
|
||||||
Subject: [PATCH] Add 1.8 recipes for stone variants
|
Subject: [PATCH] Add 1.8 recipes for stone variants
|
@ -1,4 +1,4 @@
|
|||||||
From bd1bd2ff1f6e2b5c5b9c1ca921c641e41497e518 Mon Sep 17 00:00:00 2001
|
From 8893f8d37c41a94efb574440d782b37507bb35a0 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Wed, 2 Jul 2014 22:34:04 -0500
|
Date: Wed, 2 Jul 2014 22:34:04 -0500
|
||||||
Subject: [PATCH] Ability to disable asynccatcher
|
Subject: [PATCH] Ability to disable asynccatcher
|
@ -1,11 +1,11 @@
|
|||||||
From 73f5bcdfc505cbe22effd9eb8730ad348eb77e67 Mon Sep 17 00:00:00 2001
|
From 6ae054e09e188a5c554a9890f78ad90330cc1146 Mon Sep 17 00:00:00 2001
|
||||||
From: Iceee <andrew@opticgaming.tv>
|
From: Iceee <andrew@opticgaming.tv>
|
||||||
Date: Thu, 12 Jun 2014 13:37:35 -0500
|
Date: Thu, 12 Jun 2014 13:37:35 -0500
|
||||||
Subject: [PATCH] Fix redstone lag issues
|
Subject: [PATCH] Fix redstone lag issues
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 8cbfa30..fd7f4bb 100644
|
index 032e434..3789cd5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -526,6 +526,7 @@ public class WorldServer extends World {
|
@@ -526,6 +526,7 @@ public class WorldServer extends World {
|
@ -1,4 +1,4 @@
|
|||||||
From ac7c65470448906bdc983a919edf2280c1528e12 Mon Sep 17 00:00:00 2001
|
From c9393968006a108f75f680569f8a64eac5500392 Mon Sep 17 00:00:00 2001
|
||||||
From: T00thpick1 <t00thpick1dirko@gmail.com>
|
From: T00thpick1 <t00thpick1dirko@gmail.com>
|
||||||
Date: Mon, 23 Jun 2014 21:37:24 -0500
|
Date: Mon, 23 Jun 2014 21:37:24 -0500
|
||||||
Subject: [PATCH] Do not remove player in world change
|
Subject: [PATCH] Do not remove player in world change
|
@ -1,4 +1,4 @@
|
|||||||
From 94d24a568e63591ca653be2a2e248b8520eb740a Mon Sep 17 00:00:00 2001
|
From 7913b1797fbba21781b1fd38c82f934e312dcc54 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 8 Jul 2014 16:29:49 -0500
|
Date: Tue, 8 Jul 2014 16:29:49 -0500
|
||||||
Subject: [PATCH] Fix directional TNT bias
|
Subject: [PATCH] Fix directional TNT bias
|
@ -1,4 +1,4 @@
|
|||||||
From 1e594bb5023efa579f537705e072494d608fa4a0 Mon Sep 17 00:00:00 2001
|
From 345eaa64dd6e8b8d83f2e6c3cc9e2972388a057e Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Tue, 24 Jun 2014 22:55:30 -0500
|
Date: Tue, 24 Jun 2014 22:55:30 -0500
|
||||||
Subject: [PATCH] Fix zombie sieges and their spawn mechanics
|
Subject: [PATCH] Fix zombie sieges and their spawn mechanics
|
@ -1,4 +1,4 @@
|
|||||||
From 5733313aae452f28afd6ae57cc1f44e88c93a700 Mon Sep 17 00:00:00 2001
|
From cf71d686e097ddac98528fc12f21ba6197fc5447 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Sun, 29 Jun 2014 13:22:09 -0500
|
Date: Sun, 29 Jun 2014 13:22:09 -0500
|
||||||
Subject: [PATCH] Configurable fishing time ranges
|
Subject: [PATCH] Configurable fishing time ranges
|
@ -1,4 +1,4 @@
|
|||||||
From 9df86766b4f697aa783f938dd34fd789a525436e Mon Sep 17 00:00:00 2001
|
From c7ed0748863164dbeca2f207f0b3fec9741d5927 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Sun, 29 Jun 2014 13:32:36 -0500
|
Date: Sun, 29 Jun 2014 13:32:36 -0500
|
||||||
Subject: [PATCH] Allow nerfed mobs to jump
|
Subject: [PATCH] Allow nerfed mobs to jump
|
@ -1,11 +1,11 @@
|
|||||||
From 49b4586b78701abab84fccae9f8d1a26176b3f13 Mon Sep 17 00:00:00 2001
|
From 247823b394423523fe209169a33f8bac0981c93d Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Thu, 3 Jul 2014 00:53:47 -0500
|
Date: Thu, 3 Jul 2014 00:53:47 -0500
|
||||||
Subject: [PATCH] Configurable interaction limit restriction
|
Subject: [PATCH] Configurable interaction limit restriction
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 1221319..f8967f7 100644
|
index bb6e91a..e855611 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -59,6 +59,8 @@ import org.bukkit.inventory.InventoryView;
|
@@ -59,6 +59,8 @@ import org.bukkit.inventory.InventoryView;
|
@ -1,4 +1,4 @@
|
|||||||
From e23cc5ffca45879a20c480fdb73f6079765f5246 Mon Sep 17 00:00:00 2001
|
From 36c586d93bb138448fc82a3dfb9b52c85893dcd8 Mon Sep 17 00:00:00 2001
|
||||||
From: gsand <gsandowns@gmail.com>
|
From: gsand <gsandowns@gmail.com>
|
||||||
Date: Sun, 6 Jul 2014 06:42:49 -0400
|
Date: Sun, 6 Jul 2014 06:42:49 -0400
|
||||||
Subject: [PATCH] Player Exhaustion Multipliers
|
Subject: [PATCH] Player Exhaustion Multipliers
|
@ -1,11 +1,11 @@
|
|||||||
From 945f1b620750fff14a25936a47aa5eae2f336a7c Mon Sep 17 00:00:00 2001
|
From 33e352ff883ba45ef875b10793487bfde0252ecb Mon Sep 17 00:00:00 2001
|
||||||
From: Suddenly <suddenly@suddenly.coffee>
|
From: Suddenly <suddenly@suddenly.coffee>
|
||||||
Date: Mon, 7 Jul 2014 04:11:34 +0100
|
Date: Mon, 7 Jul 2014 04:11:34 +0100
|
||||||
Subject: [PATCH] Add configurable despawn distances for living entities
|
Subject: [PATCH] Add configurable despawn distances for living entities
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index 99e7b2b..70de8b6 100644
|
index 99e7b2b..af9ed68 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -382,13 +382,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -382,13 +382,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
@ -1,4 +1,4 @@
|
|||||||
From 725a7c49ea86a5c4c8edb8daa9b47e372c4634c2 Mon Sep 17 00:00:00 2001
|
From 722471328e7515099b512065c208785a1f0443da Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <Zbob750@live.com>
|
From: Zach Brown <Zbob750@live.com>
|
||||||
Date: Mon, 7 Jul 2014 16:28:46 -0500
|
Date: Mon, 7 Jul 2014 16:28:46 -0500
|
||||||
Subject: [PATCH] Don't tick chests
|
Subject: [PATCH] Don't tick chests
|
@ -1,4 +1,4 @@
|
|||||||
From 10c0a8d570500dbaf141cd09c19e30a06e59184a Mon Sep 17 00:00:00 2001
|
From 9950f9c12273919665410851fcc1fc03fff79a75 Mon Sep 17 00:00:00 2001
|
||||||
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
From: Dmck2b <itallhappenedverysuddenly@gmail.com>
|
||||||
Date: Tue, 8 Jul 2014 23:55:29 +0100
|
Date: Tue, 8 Jul 2014 23:55:29 +0100
|
||||||
Subject: [PATCH] Allow disabling of spawn chunks always being loaded
|
Subject: [PATCH] Allow disabling of spawn chunks always being loaded
|
21
CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch
Normal file
21
CraftBukkit-Patches/0025-Fix-Null-Tile-Entity-Worlds.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From 2ad338cf6855c7e88f2c97a01a5f6459044da79e Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Evan A. Haskell" <eah2119@gmail.com>
|
||||||
|
Date: Thu, 26 Jun 2014 18:37:29 -0400
|
||||||
|
Subject: [PATCH] Fix Null Tile Entity Worlds
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
|
index 1d949e7..ca1a02c 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
|
@@ -2021,6 +2021,7 @@ public abstract class World implements IBlockAccess {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ tileentity.a(this); // PaperSpigot - No null worlds
|
||||||
|
this.a.add(tileentity);
|
||||||
|
} else {
|
||||||
|
this.tileEntityList.add(tileentity);
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user