mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Rollback rtp change to fix stack overflow error
This commit is contained in:
1 parent
18673f3936
commit
ad59a5b2a0
3 files changed
+4
-11
No files matched your search
@@ -53,7 +53,8 @@ public final class BukkitAdapter {
|
||||
case NETHER -> net.william278.huskhomes.position.World.Environment.NETHER;
|
||||
case THE_END -> net.william278.huskhomes.position.World.Environment.THE_END;
|
||||
case CUSTOM -> net.william278.huskhomes.position.World.Environment.CUSTOM;
|
||||
}, adaptLocation(world.getSpawnLocation()).orElse(null)));
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,22 +27,15 @@ public class World {
|
||||
@Nullable
|
||||
public Environment environment;
|
||||
|
||||
/**
|
||||
* Spawn location of the world
|
||||
*/
|
||||
@Nullable
|
||||
public Location spawn;
|
||||
|
||||
public World(@NotNull String name, @NotNull UUID uuid) {
|
||||
this.name = name;
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public World(@NotNull String name, @NotNull UUID uuid, @Nullable Environment environment, @Nullable Location spawn) {
|
||||
public World(@NotNull String name, @NotNull UUID uuid, @Nullable Environment environment) {
|
||||
this.name = name;
|
||||
this.uuid = uuid;
|
||||
this.environment = environment;
|
||||
this.spawn = spawn;
|
||||
}
|
||||
|
||||
public World() {
|
||||
|
||||
@@ -120,8 +120,7 @@ public abstract class RtpEngine {
|
||||
populateCache(keyedWorld.get(), cacheSize);
|
||||
}
|
||||
}
|
||||
return generateRandomPosition(world.spawn != null ? world.spawn : new Location(0, 0, 0, world))
|
||||
.join();
|
||||
return generateRandomPosition(new Location(0, 0, 0, 0f, 0f, world)).join();
|
||||
}).orTimeout(5, TimeUnit.SECONDS).exceptionally(throwable -> Optional.empty());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user