mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 0514fc4e2 Add missing effects 8f5d9effd Add getMainThreadExecutor to BukkitScheduler 313b5020b Allow adding items to BlockDropItemEvent (#5093) 9a556d9da [CI-SKIP] [Auto] Rebuild Patches 72b2768ad Inline shift fields in EnumDirection (#5082) ffff53fa7 added option to disable pathfinding updates on block changes (#5123) b67081fd7 add DragonEggFormEvent (fixes #5110) (#5112) 3eefafbaf Fix javadoc build 0081ed1c4 Add javadoc step to GH Actions 01082503e Add dropLeash variable to EntityUnleashEvent (#5130) 31f9f869a [CI-SKIP] Fix YourKit links in readme, fixes #5091 8ac27aa38 [Auto] Updated Upstream (CraftBukkit) c4d9cc831 [Auto] Updated Upstream (Bukkit/CraftBukkit) d0477d326 [Auto] Updated Upstream (CraftBukkit) d9f5f7018 EntityMoveEvent (#4614)
This commit is contained in:
54
patches/server/0168-Fix-stuck-in-portals.patch
Normal file
54
patches/server/0168-Fix-stuck-in-portals.patch
Normal file
@@ -0,0 +1,54 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Thu, 14 Jan 2021 16:48:10 -0600
|
||||
Subject: [PATCH] Fix stuck in portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 41844f30a2a98eb14559b3ab0885ae738b54520c..63eb29635957d4e6ce1274ee17a59af62d442d4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2411,12 +2411,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return new Vec2F(this.pitch, this.yaw);
|
||||
}
|
||||
|
||||
+ public BlockPosition portalPos = BlockPosition.ZERO; // Purpur
|
||||
public void d(BlockPosition blockposition) {
|
||||
if (this.ai()) {
|
||||
+ if (!(world.purpurConfig.playerFixStuckPortal && this instanceof EntityPlayer && !blockposition.equals(portalPos))) // Purpur
|
||||
this.resetPortalCooldown();
|
||||
} else if (world.purpurConfig.entitiesCanUsePortals || this instanceof EntityPlayer) { // Purpur
|
||||
if (!this.world.isClientSide && !blockposition.equals(this.ac)) {
|
||||
this.ac = blockposition.immutableCopy();
|
||||
+ portalPos = BlockPosition.ZERO; // Purpur
|
||||
}
|
||||
|
||||
this.inPortal = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index a95dbbdb1a3ce4f403eab793ec5d6820678a2116..ebff0ef7f9bf38562265fc2cd4f81f59fda2278d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1181,6 +1181,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
playerlist.d(this);
|
||||
worldserver1.removePlayer(this);
|
||||
this.dead = false;
|
||||
+ this.portalPos = MCUtil.toBlockPosition(exit); // Purpur
|
||||
|
||||
// CraftBukkit end
|
||||
this.spawnIn(worldserver);
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 403c1a4db53ea9919d14910a7dd3db9e37040507..1789c55df554335bacafba0b07bf10db09909693 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -350,6 +350,11 @@ public class PurpurWorldConfig {
|
||||
});
|
||||
}
|
||||
|
||||
+ public boolean playerFixStuckPortal = false;
|
||||
+ private void playerFixStuckPortal() {
|
||||
+ playerFixStuckPortal = getBoolean("gameplay-mechanics.player.fix-stuck-in-portal", playerFixStuckPortal);
|
||||
+ }
|
||||
+
|
||||
public boolean teleportIfOutsideBorder = false;
|
||||
private void teleportIfOutsideBorder() {
|
||||
teleportIfOutsideBorder = getBoolean("gameplay-mechanics.player.teleport-if-outside-border", teleportIfOutsideBorder);
|
||||
Reference in New Issue
Block a user