mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-25 10:29:41 -05:00
Put forceChunkLoad back to its original value.
This commit is contained in:
1 parent
beb71069b7
commit
a574ec54cc
1 file changed
+8
-2
@@ -24,7 +24,10 @@ public class PortalTravelAgent implements TravelAgent {
|
||||
|
||||
public Location findOrCreate(Location location) {
|
||||
WorldServer worldServer = ((CraftWorld) location.getWorld()).getHandle();
|
||||
worldServer.chunkProviderServer.forceChunkLoad = true;
|
||||
boolean wasEnabled = worldServer.chunkProviderServer.forceChunkLoad;
|
||||
if (!wasEnabled) {
|
||||
worldServer.chunkProviderServer.forceChunkLoad = true;
|
||||
}
|
||||
// Attempt to find a Portal.
|
||||
Location resultLocation = this.findPortal(location);
|
||||
// If a Portal cannot be found we will attempt to create one.
|
||||
@@ -38,7 +41,10 @@ public class PortalTravelAgent implements TravelAgent {
|
||||
resultLocation = location;
|
||||
}
|
||||
}
|
||||
worldServer.chunkProviderServer.forceChunkLoad = false;
|
||||
|
||||
if (!wasEnabled) {
|
||||
worldServer.chunkProviderServer.forceChunkLoad = false;
|
||||
}
|
||||
// Return our resulting portal location.
|
||||
return resultLocation;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user