Open PuffyTato opened 2 months ago
Hey, I assume SERVERIP:SERVERPORT
points to where your Create Track Map is?
Yes. I quadruple checked this, as well as the Create Track Map configuration to be sure it was pointed to exactly where the track map was.
Any errors in server console on in your browser's console on dynmap?
Not as far as I can tell. It seems the it's loading to some degree, because dynmap has the buttons to toggle off stations, tracks, trains, etc. There's just no display of those things on the map itself.
Hey just wanting to mention I'm also having this issue on Forge 1.20.1. Same thing where it loads in the information (even has the train itself)
One error I did notice is that if I click on the train to go to it, it'll give an error mentioning "can't open map 'null'" or something to that effect
Hey just wanting to mention I'm also having this issue on Forge 1.20.1. Same thing where it loads in the information (even has the train itself)
One error I did notice is that if I click on the train to go to it, it'll give an error mentioning "can't open map 'null'" or something to that effect
Hi again! Just wanted to mention that I fixed my issue with elements not appearing. It was because my world name is not "world" and therefore I had to modify the world binding. Silly mistake on my end.
As for the "map cannot be null" console error I mentioned, that still happens when trying to pan over to a train. Not really sure why but, that doesn't really matter too much to me @PuffyTato is it possible that you're having the same issue with world name definitions?
The world name was one of the things I tried, unfortunately it didn't work. No errors last time I checked so I'm unsure of how to fix the issue.
@KylePRowe @PuffyTato If you're still around, I should have a fix for both your problems.
If you don't have any train lines showing at all, check to see if you need to specify the world mapping that was previously suggestion.
Then, if you're getting the 'cannot open map null' error and you specify a custom name for the overworld, you'll probably also need to undo the default world
value to something random (and likewise if you override DIM-1 or DIM1). Here's what I have in my config:
- class: org.dynmap.ClientComponent
type: trains
base-url: "http://example.com"
worlds:
world: "poo-poo" # this is the magic sauce
"First Adventure": "minecraft:overworld"
DIM-1: "minecraft:the_nether"
DIM1: "minecraft:the_end"
After you do this change, you might notice that it still won't pan you to the correct train. I have a PR to fix that here https://github.com/Zhincore/dynmap-trains/pull/18, but you can do it yourself by editing trains.js. Below approx line 727 in, add a single line:
this.#streams.trains.onMessage((data) => {
for (const train of data.trains) {
const position = train.cars[0].leading;
const map = getMapForDimension(position.dimension, dynmap, config);
+ position.location.world = map?.options.world.name;
let $el = $("#train-" + train.id);
Make sure the leading +
isn't there. Save, clear cache, etc and it should all work properly now ✨
I'm quite sure I configured it properly but just in case:
There's not listed compatible server version, but the server is running forge 47.3.6 on the version 1.20.1. Dynmap Version: Dynmap® 3.7-beta-6 for Forge 1.20.0-1
Create Track map version: 1.4
I have quadruple checked everything as far as documentation goes, so I'm quite sure this is an issue, rather than misconfiguration. If a version is wrong, or I misconfigured something, my apologies.