mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 04:25:26 +01:00
Close Minecart containers on Entity portal.
This commit is contained in:
parent
2314af8cb0
commit
284847cd81
29
CraftBukkit-Patches/0044-Close-Minecart-Containers.patch
Normal file
29
CraftBukkit-Patches/0044-Close-Minecart-Containers.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
From 58995adb5304f5f8cc8e87c11204ad12e209157c Mon Sep 17 00:00:00 2001
|
||||||
|
From: md_5 <md_5@live.com.au>
|
||||||
|
Date: Sun, 24 Mar 2013 18:52:26 +1100
|
||||||
|
Subject: [PATCH] Close Minecart Containers
|
||||||
|
|
||||||
|
Close Minecart containers when they change worlds via entity portal.
|
||||||
|
---
|
||||||
|
src/main/java/net/minecraft/server/EntityMinecartContainer.java | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
|
index c207076..74f579d 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
|
||||||
|
@@ -149,6 +149,11 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
|
||||||
|
}
|
||||||
|
|
||||||
|
public void c(int i) {
|
||||||
|
+ // Spigot start
|
||||||
|
+ for (HumanEntity h : transaction) {
|
||||||
|
+ ((org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
|
||||||
|
+ }
|
||||||
|
+ // Spigot end
|
||||||
|
this.b = false;
|
||||||
|
super.c(i);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.1-rc2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user