Remove unnecessary blocking of chest minecarts

This is already covered by recent changes.
Closes GH-373
This commit is contained in:
Zach Brown 2017-03-19 16:17:24 -05:00
parent dbabbdbdbe
commit 1d87ea2179
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
1 changed files with 11 additions and 23 deletions

View File

@ -1,4 +1,4 @@
From 763620e8d8bd7e1c87242e6b8d6188efcdfa07d0 Mon Sep 17 00:00:00 2001
From 6df97eceddc4d2b7550bdfef945b5cb047d4bf09 Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Sat, 18 Jun 2016 01:01:37 -0500
Subject: [PATCH] Make entities look for hoppers
@ -14,7 +14,7 @@ This patch may causes a decrease in the performance of dropped items, which is w
diff --git a/src/main/java/com/destroystokyo/paper/HopperPusher.java b/src/main/java/com/destroystokyo/paper/HopperPusher.java
new file mode 100644
index 0000000..aef7c2b
index 000000000..aef7c2be9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/HopperPusher.java
@@ -0,0 +1,59 @@
@ -78,7 +78,7 @@ index 0000000..aef7c2b
+ double getZ();
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a57a397..b9b0f74 100644
index a57a3971f..b9b0f7479 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -346,4 +346,9 @@ public class PaperWorldConfig {
@ -92,7 +92,7 @@ index a57a397..b9b0f74 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java
index 1eb9c2d..c88b76a 100644
index 1eb9c2da8..c88b76a79 100644
--- a/src/main/java/net/minecraft/server/AxisAlignedBB.java
+++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java
@@ -235,6 +235,7 @@ public class AxisAlignedBB {
@ -103,20 +103,8 @@ index 1eb9c2d..c88b76a 100644
public boolean c(AxisAlignedBB axisalignedbb) {
return this.a(axisalignedbb.a, axisalignedbb.b, axisalignedbb.c, axisalignedbb.d, axisalignedbb.e, axisalignedbb.f);
}
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index 857ae9d..25d012b 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -114,6 +114,7 @@ public class BlockPortal extends BlockHalfTransparent {
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
if (!entity.isPassenger() && !entity.isVehicle() && entity.aX()) {
+ if (entity.getWorld().paperConfig.isHopperPushBased && entity instanceof EntityMinecartAbstract) return; // Paper - Mitigates GH-373
// CraftBukkit start - Entity in portal
EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
world.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 008ed20..b3c1f55 100644
index 008ed206d..b3c1f550c 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -250,6 +250,7 @@ public class BlockPosition extends BaseBlockPosition {
@ -144,7 +132,7 @@ index 008ed20..b3c1f55 100644
this.b = i;
this.c = j;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index b2234d9..a3685ec 100644
index 40a7df117..916d5e266 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -80,6 +80,19 @@ public abstract class Entity implements ICommandListener {
@ -168,7 +156,7 @@ index b2234d9..a3685ec 100644
public double motY;
public double motZ;
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 9742afc..95ca1b8 100644
index 9742afc65..95ca1b8e4 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -5,8 +5,15 @@ import javax.annotation.Nullable;
@ -205,7 +193,7 @@ index 9742afc..95ca1b8 100644
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 965aa5c..0425689 100644
index 965aa5c23..04256898b 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -7,6 +7,7 @@ import javax.annotation.Nullable;
@ -244,7 +232,7 @@ index 965aa5c..0425689 100644
private NonNullList<ItemStack> items;
private boolean b;
diff --git a/src/main/java/net/minecraft/server/IHopper.java b/src/main/java/net/minecraft/server/IHopper.java
index 804215a..e830d83 100644
index 804215a1c..e830d8390 100644
--- a/src/main/java/net/minecraft/server/IHopper.java
+++ b/src/main/java/net/minecraft/server/IHopper.java
@@ -4,9 +4,9 @@ public interface IHopper extends IInventory {
@ -261,7 +249,7 @@ index 804215a..e830d83 100644
+ double G(); default double getZ() { return G(); } // Paper - OBFHELPER
}
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 44b6ecc..022e645 100644
index 44b6ecc5d..022e64520 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -126,6 +126,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@ -390,5 +378,5 @@ index 44b6ecc..022e645 100644
if (!list.isEmpty()) {
--
2.9.3
2.12.0.windows.1