whimxiqal / journey Goto Github PK
View Code? Open in Web Editor NEWA server-side path-finding Minecraft plugin
License: MIT License
A server-side path-finding Minecraft plugin
License: MIT License
When it says that a path has been found after a successful search, the time it took to complete should be sent to the user for extra information
Add in #6
More to come.
Hi, could you add the functionality where you can edit all the texts of this plugin? It's bad to see those texts also because in my opinion this plugin is excellent for city roleplays.
Create a more complicated path based on data fed to the plugin (as waypoints provided in a coord list).
For instance a path that takes you by certain NPC's or science tool regions with characteristics we'd want you to observe.
The goal with this is to provide a "Guide" functionality, to replace the particle trail that helps players navigate a calculated path today. The integration plugin will likely require a new type of interface that extracts what the particle trail-based JourneySession can do. Then, the Citizens integration can implement a derived abstract class, like a "Guide session", that provides functionality about how to manipulate a guide entity, which would call NPC methods in Citizens.
So most functionality would be in Journey, but just the lowest level interface would be implemented by the incoming JourneyCitizens plugin. Then, users can choose what kind of display to send users, particle trail or other registered ones, like "citizens" as JourneyCitizens would call it, in a flag. Like other flags, it can be set to a default in the config and players may be given permission to use the flag if admins want. Permission should also probably be per-option... More details to come
I've noticed on the 1.1 build that the database is sometimes the error in the title.
[15:09:43 INFO]: TheDeafCreeper issued server command: /jt Hillbilly
[15:09:43 WARN]: org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
[15:09:43 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1030)
[15:09:43 WARN]: at org.sqlite.core.DB.newSQLException(DB.java:1042)
[15:09:43 WARN]: at org.sqlite.core.DB.throwex(DB.java:1007)
[15:09:43 WARN]: at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
[15:09:43 WARN]: at org.sqlite.core.NativeDB.prepare(NativeDB.java:137)
[15:09:43 WARN]: at org.sqlite.core.DB.prepare(DB.java:257)
[15:09:43 WARN]: at org.sqlite.core.CorePreparedStatement.<init>(CorePreparedStatement.java:45)
[15:09:43 WARN]: at org.sqlite.jdbc3.JDBC3PreparedStatement.<init>(JDBC3PreparedStatement.java:30)
[15:09:43 WARN]: at org.sqlite.jdbc4.JDBC4PreparedStatement.<init>(JDBC4PreparedStatement.java:25)
[15:09:43 WARN]: at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:35)
[15:09:43 WARN]: at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:241)
[15:09:43 WARN]: at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.data.sql.SqlWaypointManager.getWaypointCount(SqlWaypointManager.java:275)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.data.sql.SqlPublicWaypointManager.getCount(SqlPublicWaypointManager.java:87)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeManager.lambda$registerDefault$5(ScopeManager.java:66)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.ScopeImpl.destinations(ScopeImpl.java:78)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.search.InternalScope.lambda$new$5(InternalScope.java:69)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.search.InternalScope.sessions(InternalScope.java:82)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:162)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.locationFromSubScopes(ScopeUtil.java:212)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:187)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:153)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:112)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:69)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.common.JourneyParser$JourneytoTargetContext.accept(JourneyParser.java:1700)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:92)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:69)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.common.JourneyParser$JourneytoContext.accept(JourneyParser.java:260)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.mantle.common.MantleCommand.process(MantleCommand.java:124)
[15:09:43 WARN]: at Journey-Bukkit-1.0.2-dev-ed6e83f.jar//net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand.execute(PaperMantleCommand.java:90)
[15:09:43 WARN]: at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
[15:09:43 WARN]: at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962)
[15:09:43 WARN]: at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[15:09:43 WARN]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[15:09:43 WARN]: at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:313)
[15:09:43 WARN]: at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:297)
[15:09:43 WARN]: at net.minecraft.server.network.PlayerConnection.b(PlayerConnection.java:2386)
[15:09:43 WARN]: at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$21(PlayerConnection.java:2340)
[15:09:43 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[15:09:43 WARN]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[15:09:43 WARN]: at net.minecraft.server.TickTask.run(TickTask.java:18)
[15:09:43 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[15:09:43 WARN]: at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1368)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185)
[15:09:43 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.bh(MinecraftServer.java:1345)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1338)
[15:09:43 WARN]: at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1416)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.v(MinecraftServer.java:1194)
[15:09:43 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310)
[15:09:43 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[15:09:43 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'jt Hillbilly' in net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand(journeyto)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:178) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:962) ~[purpur-1.19.2.jar:git-Purpur-1838]
at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.2.jar:git-Purpur-1838]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.2.jar:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:313) ~[?:?]
at net.minecraft.commands.Commands.performCommand(Commands.java:297) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2386) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2340) ~[?:?]
at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1368) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1345) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1338) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1416) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1194) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1838]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: net.whimxiqal.journey.data.DataAccessException
at net.whimxiqal.journey.data.sql.SqlWaypointManager.getWaypointCount(SqlWaypointManager.java:295) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.data.sql.SqlPublicWaypointManager.getCount(SqlPublicWaypointManager.java:87) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.scope.ScopeManager.lambda$registerDefault$5(ScopeManager.java:66) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.ScopeImpl.destinations(ScopeImpl.java:78) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.search.InternalScope.lambda$new$5(InternalScope.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.search.InternalScope.sessions(InternalScope.java:82) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:162) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.scope.ScopeUtil.locationFromSubScopes(ScopeUtil.java:212) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:187) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.scope.ScopeUtil.session(ScopeUtil.java:153) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:112) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneytoTarget(JourneyExecutor.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.common.JourneyParser$JourneytoTargetContext.accept(JourneyParser.java:1700) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:92) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.visitJourneyto(JourneyExecutor.java:69) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.common.JourneyParser$JourneytoContext.accept(JourneyParser.java:260) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.libs.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.libs.mantle.common.MantleCommand.process(MantleCommand.java:124) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.libs.mantle.paper.PaperMantleCommand.execute(PaperMantleCommand.java:90) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
... 22 more
Implement Journey for Sponge API 8+.
Some players may want to just get to certain volume, like a town or biome, with no specific singular destination in mind.
This will allow integration with WorldEdit regions, Towny towns, RPG towns/farms/areas of interest, etc.
This causes water paths to be ignored as options, as well as makes it so that when in water trying to start a search fails.
There should be more debugging messages during search patterns.
Every common search event throughout a search session should send a debug message.
Also, an administrative player who can debug should be able to specify if they want debug messages from everyone or from some individual player.
The two main ways I can think of for implementing this would be to either:
JourneyPlayer
/Player
and an destination, either Cell
or Location
, then creates a PlayerDestinationGoalSearchSession
for that player.JourneyPlayer
that allows you to specify a destination (probably Cell
) to navigate to.Either way it's probably a good idea to add a way to fetch a JourneyPlayer
.
When performing a search, Journey spins up a SearchSession
, which creates one ItineraryTrial
at a time, which in turn creates multiple PathTrials
. PathTrial
s each try to find a path between an origin and a destination and ItineraryTrials
wait until the PathTrials
come back before determining whether that list of paths do, in fact, form a suitable itinerary.
When trying to find an itinerary, though, the ItineraryTrial
already knows which paths it wants. So, there's no reason each of these PathTrials
can't be parallelized over the systems available threads.
Changes would include:
Future
return values from a path trial's searchItineraryTrial
, we should try to cancel all of the ongoing PathTrial
s. If they in fact returned canceled, then we just ignore whatever else is in the result. Just like today, if any of them actually succeed even if they were cancelled, then we should still treat that like a success for caching purposes.PathTrials
during an ItineraryTrial
and wait for them to all complete (and cancel, if needed, as described above)SearchSessions
may be going at one time. Today, this effectively limits how many PathTrials
are searching, which in turn limits how much memory the plugin can possibly use, since each of the PathTrials
have a limited number of visited nodes during its A* search. This new functionality invalidates that assumption, since each SearchSession
may now have multiple searches running in parallel. So, we could instead change the config parameter to something that tracks the maximum number of path algorithms running at one time (we can keep the same name, just change its description). But, we actually still have a problem: this should probably be its own ticket:
Other notes:
I started using it ages ago for this project, but I've jumped back and forth with actually using it so it just makes for messy files and an unclear overall style. I don't use it in tons of places, so I'd just rather get rid of altogether and create manual getters where needed.
Add the ability for players to avoid water during GPS routes
settings like gui.home-screen-title
are still set to appear in new config.yml
files, even though those settings have been deprecated and now use values in messages.yml
. These should be removed
Some features that have been requested:
I'm not sure where to start but can someone look into this? Thanks
[01:45:00] [Server thread/INFO]: [Journey] Enabling Journey v1.1.0
[01:45:00] [Server thread/INFO]: [Journey] Initializing Journey...
[01:45:00] [Server thread/ERROR]: Error occurred while enabling Journey v1.1.0 (Is it up to date?)
java.lang.NoClassDefFoundError: net/kyori/adventure/text/ComponentLike
at net.whimxiqal.journey.Journey.(Journey.java:49) ~[?:?]
at net.whimxiqal.journey.Journey.create(Journey.java:69) ~[?:?]
at net.whimxiqal.journey.bukkit.JourneyBukkit.onEnable(JourneyBukkit.java:69) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:266) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:480) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:540) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:454) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:589) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:414) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:250) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:973) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.20.1-R0.1-SNAPSHOT.jar:3810-Spigot-c62f4bd-b6b514b]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.text.ComponentLike
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:147) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-api-1.20.1-R0.1-SNAPSHOT.jar:?]
at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
... 14 more
Add language support
Hello, I have a problem with the bridge, the plugin does not want to create a path to lead the player past the bridge shown in the screenshot, what can I change in such a situation? bridge material?
[11:29:20 WARN]: java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24 [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.CraftChunkSnapshot.getBlockData(CraftChunkSnapshot.java:109) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.bukkit.chunk.BukkitSessionJourneyChunk.block(BukkitSessionJourneyChunk.java:51) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.chunk.ChunkCacheBlockProvider.toBlock(ChunkCacheBlockProvider.java:66) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.navigation.mode.FlyMode.getDestinations(FlyMode.java:79) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.search.PathTrial.runSafe(PathTrial.java:283) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.search.PathTrial.run(PathTrial.java:195) [11:29:20 WARN]: at Journey-Bukkit-1.2.0.jar//net.whimxiqal.journey.manager.DistributedWorkManager$WorkItemExecutor.run(DistributedWorkManager.java:118) [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftTask.run(CraftTask.java:101) [11:29:20 WARN]: at org.bukkit.craftbukkit.v1_20_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) [11:29:20 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) [11:29:20 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [11:29:20 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [11:29:20 WARN]: at java.base/java.lang.Thread.run(Thread.java:833) [11:29:20 ERROR]: [Journey] [Destination Path Search] {session: bcd17bfe-1810-4477-bb7e-14c472524035, origin: {x: -43, y: 173, z: -45, domain: 1}, destination: {x: 27, y: 174, z: -160, domain: 1}, cycles: 9756, state: running, visited: 9757478, from cache: false}: A java.lang.ArrayIndexOutOfBoundsException occurred, failing ![2024-01-23_11 36 57]
A bunch of people tried to start paths at once and it caused a ton of lag, and the following error.
(It also caused DB locked errors which is a known issue)
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: ITZWBL_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: The3ditor_. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 4DrewsEh. Please notify the plugin owner.
[17:07:28 WARN]: [Journey] Scope from plugin Journey is using an invalid sub-scope id: 2xcl. Please notify the plugin owner.
Relevant Spark:
https://spark.lucko.me/q8f2EVVCGM
We need a command to reload the contents of the config file into memory during server operation.
Add into #6
I created an event dispatcher to relay events to Bukkit's event system to avoid creating my own event queue, thinking that an event queue was the best way to manage state in sessions. I don't think this is actually a good idea and it's been the source of some bugs and convolution.
The event dispatcher should just be removed altogether and all the places where events are dispatched should just directly call methods where appropriate. For example, many of the Start/Stop
Path/Itinerary
events just broadcast a debug statement, so that can just be called directly wherever that event is dispatched. It's best to watch out for concurrency issues, though.
Journey just fails all searches that don't fully get to the destination (if the search is trying to reach a specific destination in a specific world). In cases like this, Journey should be able to send a full itinerary to a destination "near" the requested destination. The result would include also the distance to the destination.
Canceled searches should still not return anything to the player.
Having the ability to define tunnels without needing to use the API, such as with a command or configuration options, would allow people with less development skills to utilize the feature.
Main places I can image you'd want to be able to define tunnels manually would be:
How I imagine implementation would go would either be a command with a format similar to this:
/registertunnel NAME xOrigin yOrigin zOrigin worldName xDest yDest zDest worldName
or a configuration file with entries similar to this (yaml format example):
tunnels:
name:
origin:
x: 0
y: 0
z: 0
world: world
destination:
x: 0
y: 0
z: 0
world: world_the_nether
Strangest part is that according to spark, TPS dips but MSPT does not spike.
It also does not appear to be the plugin creating the path as the particles already exist when it starts lagging, maybe it's when it cleans up stuff?
Server Version: git-Purpur-1838 (MC: 1.19.2)
Plugin Version: 1.0.2
MySQL support was removed for the first official release because it was untested. Once tested, and fixed if broken, MySQL can be re-enabled.
[17:06:41 ERROR]: Thread Craft Scheduler Thread - 824 - Journey failed main thread check: Chunk getEntities call
java.lang.Throwable: null
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:15) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2523) ~[?:?]
at net.minecraft.server.level.ServerLevel.getEntity(ServerLevel.java:1983) ~[?:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.getEntity(CraftServer.java:2595) ~[purpur-1.19.2.jar:git-Purpur-1838]
at org.bukkit.Bukkit.getEntity(Bukkit.java:2060) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at net.whimxiqal.journey.bukkit.BukkitPlatformProxy.entityCellLocation(BukkitPlatformProxy.java:142) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.destinationSearch(JourneyExecutor.java:348) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.lambda$personalWaypointSearch$10(JourneyExecutor.java:331) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1838]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.2.jar:git-Purpur-1838]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[17:06:41 WARN]: [Journey] Plugin Journey v1.0.2-dev-ed6e83f generated an exception while executing task 12446829
java.lang.IllegalStateException: Asynchronous Chunk getEntities call!
at org.spigotmc.AsyncCatcher.catchOp(AsyncCatcher.java:16) ~[purpur-1.19.2.jar:git-Purpur-1838]
at net.minecraft.server.level.ServerLevel.getEntities(ServerLevel.java:2523) ~[?:?]
at net.minecraft.server.level.ServerLevel.getEntity(ServerLevel.java:1983) ~[?:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.getEntity(CraftServer.java:2595) ~[purpur-1.19.2.jar:git-Purpur-1838]
at org.bukkit.Bukkit.getEntity(Bukkit.java:2060) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
at net.whimxiqal.journey.bukkit.BukkitPlatformProxy.entityCellLocation(BukkitPlatformProxy.java:142) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.destinationSearch(JourneyExecutor.java:348) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at net.whimxiqal.journey.command.JourneyExecutor$1.lambda$personalWaypointSearch$10(JourneyExecutor.java:331) ~[Journey-Bukkit-1.0.2-dev-ed6e83f.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.19.2.jar:git-Purpur-1838]
at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.19.2.jar:git-Purpur-1838]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.19.2.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Such as iron doors, end rods, single-standing glass blocks, etc...
Journey calculation can be used in many more scenarios than just static-destination solving.
An ongoing list of more features to implement into the command structure:
Add flag defaults to pathing queries like suggested time, blocks to ignore, etc
I never really liked most of the messages that are sent to the user for every-day type of stuff. Like "Searching..." is pretty bland, and I don't love the gold-orange color that's supposed to represent INFO
statements. Also, "Success! Please follow the path" is pretty bad too, especially because sometimes the first move is a prompt like "type the following command", so "following the path" isn't even accurate.
A proposal should be made for
Also, since we've married ourselves to Kyori Adventure, we should use it to its fullest extent.
A new tool has been added that allows you to set a one-time start/end point by left/right click.
Command:
/journey tool
Permissions
journey.command.tool
journey.command.tool.autocalculation
Maybe need to add a cooldown.
config.yml
cooldown-time: <number>
(Second
English is not my language, so please forgive me if it means weird
Roads would be one or more patterns you could provide that tell Journey a specific path speeds you up.
For example, on a server I develop for you can gain a speed boost by putting copper slabs under any block, so if I were to register that setup as a road I would so something like:
registerRoadPattern(["*", "COPPER_SLAB"], 1.25) (list of materials, speed multiplier)
.
The main issues I could see arising from this are:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.