Update from upstream SpigotMC
Fixed: Check cast SpigotMC/Spigot@7efa75c63a
This commit is contained in:
parent
a0d7f57073
commit
dca3a3b021
@ -1,4 +1,4 @@
|
||||
From 556009e8fbd6c78308510f470f9ee787d3e43a75 Mon Sep 17 00:00:00 2001
|
||||
From 7145e03eed873f3a2a1d4aba7c7d66f079a621f4 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Thu, 27 Jun 2013 17:26:09 +1000
|
||||
Subject: [PATCH] Properly Close Inventories
|
||||
@ -6,35 +6,41 @@ Subject: [PATCH] Properly Close Inventories
|
||||
Properly close inventories when unloading and switching worlds.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 40c878b..6112709 100644
|
||||
index 40c878b..ab0af12 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -783,6 +783,15 @@ public class Chunk {
|
||||
@@ -783,6 +783,18 @@ public class Chunk {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
TileEntity tileentity = (TileEntity) iterator.next();
|
||||
+ // Spigot Start
|
||||
+ if ( tileentity instanceof IInventory )
|
||||
+ {
|
||||
+ for ( org.bukkit.craftbukkit.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.entity.CraftHumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
|
||||
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) tileentity ).getViewers() ) )
|
||||
+ {
|
||||
+ h.getHandle().closeInventory();
|
||||
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
||||
+ {
|
||||
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Spigot End
|
||||
|
||||
this.world.a(tileentity);
|
||||
}
|
||||
@@ -792,6 +801,15 @@ public class Chunk {
|
||||
@@ -792,6 +804,18 @@ public class Chunk {
|
||||
java.util.Iterator<Object> iter = this.entitySlices[i].iterator();
|
||||
while (iter.hasNext()) {
|
||||
Entity entity = (Entity) iter.next();
|
||||
+ // Spigot Start
|
||||
+ if ( entity instanceof IInventory )
|
||||
+ {
|
||||
+ for ( org.bukkit.craftbukkit.entity.CraftHumanEntity h : new ArrayList<org.bukkit.craftbukkit.entity.CraftHumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
|
||||
+ for ( org.bukkit.entity.HumanEntity h : new ArrayList<org.bukkit.entity.HumanEntity>( (List) ( (IInventory) entity ).getViewers() ) )
|
||||
+ {
|
||||
+ h.getHandle().closeInventory();
|
||||
+ if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
|
||||
+ {
|
||||
+ ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Spigot End
|
||||
@ -60,4 +66,3 @@ index 13b75ff..bf8e745 100644
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 2122ad064c44b2fc30dedd211c7d77eb675ac997 Mon Sep 17 00:00:00 2001
|
||||
From ace27befb235223223df00019ad6a5e1e6b106e7 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
Date: Mon, 2 Dec 2013 23:42:09 +0000
|
||||
Subject: [PATCH] Fix some chunks not being sent to the client
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 6112709..04c0d64 100644
|
||||
index ab0af12..b1213f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -955,7 +955,15 @@ public class Chunk {
|
||||
@@ -961,7 +961,15 @@ public class Chunk {
|
||||
}
|
||||
|
||||
public boolean isReady() {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From c9398e09ef1075e6c74f3fab117fe5704ff229f8 Mon Sep 17 00:00:00 2001
|
||||
From c1f169eb0d0b24c2d56c853920cb54b09e0cf789 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sun, 12 Jan 2014 20:56:41 +1100
|
||||
Subject: [PATCH] Try and Debug Crash Reports Crashing
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ee74b03..edd781e 100644
|
||||
index 6a31aaa..28471d6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -661,7 +661,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -664,7 +664,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
worldserver.doTick();
|
||||
worldserver.timings.doTick.stopTiming(); // Spigot
|
||||
} catch (Throwable throwable) {
|
||||
@ -22,7 +22,7 @@ index ee74b03..edd781e 100644
|
||||
worldserver.a(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -671,7 +677,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
@@ -674,7 +680,13 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
worldserver.tickEntities();
|
||||
worldserver.timings.tickEntities.stopTiming(); // Spigot
|
||||
} catch (Throwable throwable1) {
|
||||
|
Loading…
Reference in New Issue
Block a user