mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +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 NETHER -> net.william278.huskhomes.position.World.Environment.NETHER;
|
||||||
case THE_END -> net.william278.huskhomes.position.World.Environment.THE_END;
|
case THE_END -> net.william278.huskhomes.position.World.Environment.THE_END;
|
||||||
case CUSTOM -> net.william278.huskhomes.position.World.Environment.CUSTOM;
|
case CUSTOM -> net.william278.huskhomes.position.World.Environment.CUSTOM;
|
||||||
}, adaptLocation(world.getSpawnLocation()).orElse(null)));
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -27,22 +27,15 @@ public class World {
|
|||||||
@Nullable
|
@Nullable
|
||||||
public Environment environment;
|
public Environment environment;
|
||||||
|
|
||||||
/**
|
|
||||||
* Spawn location of the world
|
|
||||||
*/
|
|
||||||
@Nullable
|
|
||||||
public Location spawn;
|
|
||||||
|
|
||||||
public World(@NotNull String name, @NotNull UUID uuid) {
|
public World(@NotNull String name, @NotNull UUID uuid) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.uuid = uuid;
|
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.name = name;
|
||||||
this.uuid = uuid;
|
this.uuid = uuid;
|
||||||
this.environment = environment;
|
this.environment = environment;
|
||||||
this.spawn = spawn;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public World() {
|
public World() {
|
||||||
|
|||||||
@@ -120,8 +120,7 @@ public abstract class RtpEngine {
|
|||||||
populateCache(keyedWorld.get(), cacheSize);
|
populateCache(keyedWorld.get(), cacheSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return generateRandomPosition(world.spawn != null ? world.spawn : new Location(0, 0, 0, world))
|
return generateRandomPosition(new Location(0, 0, 0, 0f, 0f, world)).join();
|
||||||
.join();
|
|
||||||
}).orTimeout(5, TimeUnit.SECONDS).exceptionally(throwable -> Optional.empty());
|
}).orTimeout(5, TimeUnit.SECONDS).exceptionally(throwable -> Optional.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user