mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-23 04:58:28 +01:00
Block minecart portal teleports in some instances
Mitigates GH-373 Technically a workaround rather than a true fix
This commit is contained in:
parent
ca7a828688
commit
e4251a092b
1 changed files with 12 additions and 0 deletions
|
@ -103,6 +103,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public boolean b(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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPortal.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
|
|
Loading…
Add table
Reference in a new issue