Fix Nether Portal Creation on cancelled event
Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel This causes nether portals to not be generated if the event is ever cancelled
This commit is contained in:
parent
ff5bd7b03b
commit
52c8fc7633
|
@ -0,0 +1,24 @@
|
|||
From 8e93845e08efce37a5378c954743a983e142ff05 Mon Sep 17 00:00:00 2001
|
||||
From: chickeneer <emcchickeneer@gmail.com>
|
||||
Date: Mon, 7 Aug 2017 23:07:32 -0400
|
||||
Subject: [PATCH] Fix Nether Portal Creation on cancelled event
|
||||
|
||||
Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel
|
||||
|
||||
This causes nether portals to not be generated if the event is ever cancelled
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 34ac15d5e..190bda020 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2371,6 +2371,7 @@ public abstract class Entity implements ICommandListener {
|
||||
event.useTravelAgent(useTravelAgent);
|
||||
event.getEntity().getServer().getPluginManager().callEvent(event);
|
||||
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) {
|
||||
+ agent.setCanCreatePortal(oldCanCreate); // Paper
|
||||
return null;
|
||||
}
|
||||
exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
|
||||
--
|
||||
2.13.0
|
||||
|
Loading…
Reference in New Issue