thebuildcraft / RemotePlayerWaypointsForXaero

Shows player and marker positions from Dynmap, Bluemap, Squaremap or Pl3xMap in game using Xaeros Minimap and Worldmap. Also displays AFK status in the tab list.
GNU General Public License v3.0
10 stars 3 forks source link

url issues #2

Closed SulpherStaer closed 3 months ago

SulpherStaer commented 3 months ago

https://github.com/thebuildcraft/RemotePlayerWaypointsForXaero/blob/89209609f0e1a8afa421b1b58c3f63cb2fe29a97/src/main/java/tbc/remote_player_waypoints_for_xaero/connections/DynmapConnection.java#L48

This line looks for name, but should look for defaultworld, edit: though then it wouldn't work in the end or nether, or other custom dimensions... Mhmm, don't know the exact solution then... just knows this doesn't work.

https://map.comps.mp/up/configuration

complementary smp does not work with this mod, the world name is 'survival' - as you can see, your mod picks the wrong name.

SulpherStaer commented 3 months ago

{"updaterate":12000.0,"chatlengthlimit":256,"components":[{"spawnlabel":"Spawn","spawnbedhidebydefault":true,"spawnbedformat":"%name%'s bed","worldborderlabel":"Border","showworldborder":false,"type":"markers","showlabel":true,"offlineicon":"offlineuser","showspawnbeds":false,"showofflineplayers":false,"spawnbedicon":"bed","offlinehidebydefault":true,"offlinelabel":"Offline","enablesigns":false,"default-sign-set":"markers","spawnicon":"world","offlineminzoom":0,"spawnbedminzoom":0,"showspawn":false,"spawnbedlabel":"Spawn Beds","maxofflinetime":1},{"allowurlname":false,"type":"chat"},{"focuschatballoons":false,"type":"chatballoon"},{"showplayerfaces":true,"sendbutton":false,"type":"chatbox","messagettl":5},{"hidebydefault":false,"showplayerhealth":false,"showplayerbody":false,"showplayerfaces":true,"largeplayerfaces":false,"label":"Players","type":"playermarkers","smallplayerfaces":false,"layerprio":0},{"type":"link"},{"showdigitalclock":true,"showweather":true,"type":"timeofdayclock"},{"show-mcr":false,"label":"Location","type":"coord","show-chunk":false,"hidey":false}],"worlds":[{"sealevel":63,"protected":false,"maps":[{"nightandday":false,"shader":"stdtexture","compassview":"S","prefix":"flat","tilescale":2,"icon":null,"scale":1,"azimuth":270.0,"type":"HDMapType","title":"Flat","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_S_90_xlowres","worldtomap":[1.0,0.0,-6.123233995736766E-17,-6.123233995736766E-17,0.0,-1.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"shadows","bigmap":true,"maptoworld":[1.0,-6.123233995736766E-17,0.0,0.0,0.0,1.0,-6.123233995736766E-17,-1.0,0.0],"background":null,"boostzoom":3,"name":"flat","backgroundnight":null,"mapzoomin":4},{"nightandday":false,"shader":"stdtexture","compassview":"SE","prefix":"t","tilescale":1,"icon":null,"scale":1,"azimuth":225.0,"type":"HDMapType","title":"Surface","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_SE_60_xlowres","worldtomap":[0.7071067811865475,0.0,-0.7071067811865476,-0.6123724356957946,0.49999999999999994,-0.6123724356957945,-4.8074067159589095E-17,0.9999999999999999,-4.8074067159589095E-17],"inclination":60.0,"image-format":"jpg","lighting":"shadows","bigmap":true,"maptoworld":[0.7071067811865475,-0.816496580927726,0.408248290463863,0.0,-5.551115123125783E-17,1.0000000000000002,-0.7071067811865476,-0.8164965809277259,0.40824829046386296],"background":null,"boostzoom":3,"name":"surface","backgroundnight":null,"mapzoomin":4},{"nightandday":false,"shader":"inhabited_extra_colors","compassview":"S","prefix":"inhabited","tilescale":2,"icon":"images\/block_world_heat.svg","scale":1,"azimuth":270.0,"type":"HDMapType","title":"Inhabited","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_S_90_xlowres","worldtomap":[1.0,0.0,-6.123233995736766E-17,-6.123233995736766E-17,0.0,-1.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"default","bigmap":true,"maptoworld":[1.0,-6.123233995736766E-17,0.0,0.0,0.0,1.0,-6.123233995736766E-17,-1.0,0.0],"background":"#0A041B","boostzoom":0,"name":"inhabited","backgroundnight":null,"mapzoomin":4}],"extrazoomout":8,"center":{"x":24358.0,"y":64.0,"z":-12104.0},"name":"survival","title":"Overworld","worldheight":320},{"sealevel":63,"protected":false,"maps":[{"nightandday":false,"shader":"default","compassview":"S","prefix":"flat","tilescale":2,"icon":null,"scale":16,"azimuth":270.0,"type":"HDMapType","title":"flat","backgroundday":null,"protected":false,"mapzoomout":3,"perspective":"iso_S_90_hires","worldtomap":[16.0,0.0,-9.797174393178826E-16,-9.797174393178826E-16,0.0,-16.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"default","bigmap":true,"maptoworld":[0.0625,-3.827021247335479E-18,0.0,0.0,0.0,1.0,-3.827021247335479E-18,-0.0625,0.0],"background":null,"boostzoom":0,"name":"flat","backgroundnight":null,"mapzoomin":2},{"nightandday":false,"shader":"default","compassview":"SE","prefix":"surface","tilescale":2,"icon":null,"scale":16,"azimuth":225.0,"type":"HDMapType","title":"surface","backgroundday":null,"protected":false,"mapzoomout":3,"perspective":"iso_SE_60_hires","worldtomap":[11.31370849898476,0.0,-11.313708498984761,-9.797958971132713,7.999999999999999,-9.797958971132712,-4.8074067159589095E-17,0.9999999999999999,-4.8074067159589095E-17],"inclination":60.0,"image-format":"jpg","lighting":"default","bigmap":true,"maptoworld":[0.044194173824159216,-0.05103103630798288,0.408248290463863,0.0,-3.469446951953614E-18,1.0000000000000002,-0.04419417382415922,-0.05103103630798287,0.40824829046386296],"background":null,"boostzoom":0,"name":"surface","backgroundnight":null,"mapzoomin":2}],"extrazoomout":0,"center":{"x":0.5,"y":0.0,"z":0.5},"name":"pk_crea_creative_superflat","title":"Creative","worldheight":320},{"sealevel":63,"protected":false,"maps":[{"nightandday":false,"shader":"stdtexture","compassview":"S","prefix":"flat","tilescale":2,"icon":null,"scale":1,"azimuth":270.0,"type":"HDMapType","title":"Flat","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_S_90_xlowres","worldtomap":[1.0,0.0,-6.123233995736766E-17,-6.123233995736766E-17,0.0,-1.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"nethershadows","bigmap":true,"maptoworld":[1.0,-6.123233995736766E-17,0.0,0.0,0.0,1.0,-6.123233995736766E-17,-1.0,0.0],"background":"#300806","boostzoom":3,"name":"flat","backgroundnight":null,"mapzoomin":4},{"nightandday":false,"shader":"stdtexture","compassview":"SE","prefix":"nt","tilescale":1,"icon":null,"scale":1,"azimuth":225.0,"type":"HDMapType","title":"Surface","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_SE_60_xlowres","worldtomap":[0.7071067811865475,0.0,-0.7071067811865476,-0.6123724356957946,0.49999999999999994,-0.6123724356957945,-4.8074067159589095E-17,0.9999999999999999,-4.8074067159589095E-17],"inclination":60.0,"image-format":"jpg","lighting":"nethershadows","bigmap":true,"maptoworld":[0.7071067811865475,-0.816496580927726,0.408248290463863,0.0,-5.551115123125783E-17,1.0000000000000002,-0.7071067811865476,-0.8164965809277259,0.40824829046386296],"background":"#300806","boostzoom":3,"name":"nether","backgroundnight":null,"mapzoomin":4},{"nightandday":false,"shader":"inhabited_extra_colors","compassview":"S","prefix":"inhabited","tilescale":2,"icon":"images\/block_world_heat.svg","scale":1,"azimuth":270.0,"type":"HDMapType","title":"inhabited","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_S_90_xlowres","worldtomap":[1.0,0.0,-6.123233995736766E-17,-6.123233995736766E-17,0.0,-1.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"default","bigmap":true,"maptoworld":[1.0,-6.123233995736766E-17,0.0,0.0,0.0,1.0,-6.123233995736766E-17,-1.0,0.0],"background":"#0A041B","boostzoom":0,"name":"inhabited","backgroundnight":null,"mapzoomin":4}],"extrazoomout":8,"center":{"x":3050.0,"y":108.0,"z":-1525.0},"name":"DIM-1","title":"Nether","worldheight":256},{"sealevel":63,"protected":false,"maps":[{"nightandday":false,"shader":"stdtexture","compassview":"S","prefix":"flat","tilescale":2,"icon":null,"scale":1,"azimuth":270.0,"type":"HDMapType","title":"Flat","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_S_90_xlowres","worldtomap":[1.0,0.0,-6.123233995736766E-17,-6.123233995736766E-17,0.0,-1.0,0.0,1.0,0.0],"inclination":90.0,"image-format":"jpg","lighting":"brightnight","bigmap":true,"maptoworld":[1.0,-6.123233995736766E-17,0.0,0.0,0.0,1.0,-6.123233995736766E-17,-1.0,0.0],"background":"#120d18","boostzoom":3,"name":"flat","backgroundnight":null,"mapzoomin":4},{"nightandday":false,"shader":"stdtexture","compassview":"SE","prefix":"st","tilescale":1,"icon":"images\/block_the_end_surface.svg","scale":1,"azimuth":225.0,"type":"HDMapType","title":"Surface","backgroundday":null,"protected":false,"mapzoomout":9,"perspective":"iso_SE_60_xlowres","worldtomap":[0.7071067811865475,0.0,-0.7071067811865476,-0.6123724356957946,0.49999999999999994,-0.6123724356957945,-4.8074067159589095E-17,0.9999999999999999,-4.8074067159589095E-17],"inclination":60.0,"image-format":"jpg","lighting":"brightnight","bigmap":true,"maptoworld":[0.7071067811865475,-0.816496580927726,0.408248290463863,0.0,-5.551115123125783E-17,1.0000000000000002,-0.7071067811865476,-0.8164965809277259,0.40824829046386296],"background":"#120d18","boostzoom":3,"name":"the_end","backgroundnight":null,"mapzoomin":4}],"extrazoomout":8,"center":{"x":0.0,"y":64.0,"z":0.0},"name":"DIM1","title":"End","worldheight":256}],"confighash":-1220565864,"spammessage":"You may only chat once every %interval% seconds.","defaultmap":"flat","msg-chatrequireslogin":"Chat Requires Login","msg-hiddennamejoin":"Player joined","title":"0.0.0.0","grayplayerswhenhidden":true,"quitmessage":"%playername% quit","defaultzoom":8,"allowwebchat":false,"allowchat":false,"sidebaropened":"false","webchat-interval":5.0,"msg-chatnotallowed":"You are not permitted to send chat messages","loggedin":false,"coreversion":"3.7-beta-4-935","joinmessage":"%playername% joined","webchat-requires-login":false,"showlayercontrol":"true","login-enabled":false,"maxcount":50,"dynmapversion":"3.7-beta-4","msg-maptypes":"Map Types","followmap":"surface","cyrillic":false,"msg-hiddennamequit":"Player quit","msg-players":"Players","webprefix":"[WEB] ","followzoom":11,"showplayerfacesinmenu":true,"defaultworld":"survival"}

the response from the /up/configuration url - in the event the server is down

SulpherStaer commented 3 months ago

Ok - after putting the json through a formatter, the url should actually work, but it doesn't?

Some help would be nice to know how to configure this mod, and why it needs both ip & map url

thebuildcraft commented 3 months ago

Ok. I know why you are confused... The thing is: When I did it with "defaultworld" it would not work on the server I play on. And then I checked: it is completely irrelevant what world name you use (I gives you every player no matter what). So I just used the first one. It needs the server ip, because some servers have different ip's for the actual server and the map.

SulpherStaer commented 3 months ago

Is there any way to turn on aditional logging so I can figure out why it gives an error when filling in the ip I use to connect with, and the map url?

comps.mp map.comps.mp

XanderCreates commented 3 months ago

pardon my error, they do connect. but.. the issue remains afaik (if you saw my two other posts)

thebuildcraft commented 3 months ago

It should send the url to the console. If you have ATLauncher for example, you can see it.

thebuildcraft commented 3 months ago

Do you put in "map.comps.mp" as the link?

SulpherStaer commented 3 months ago

yes

thebuildcraft commented 3 months ago

XanderCreates said it would connect. But what issue remains?

XanderCreates commented 3 months ago

While it does connect, we think its not.. using the default world. We both tried with Xaero's, we even tried the DIRECT IP for the online dynmap, But we cannot see each other ingame as we expected.

thebuildcraft commented 3 months ago

Does the AFK display work? And do you have the latest version? Please look into your xaero settings, and check if "renderAllWaypointSets" is on. Ok, wait.... Maybe the problem is the multi world setup. The server ip is probably not the one you connect with

XanderCreates commented 3 months ago

Does the AFK display work? And do you have the latest version? Please look into your xaero settings, and check if "renderAllWaypointSets" is on. Ok, wait.... Maybe the problem is the multi world setup. The server ip is probably not the one you connect with

  1. AFK display had read ???
  2. of course I have that on
  3. doesn't it tell you that if that is the case? (IP)
thebuildcraft commented 3 months ago

Yes... It should tell you that the server ip is not in the config... probably. Did it say sth in the chat? You can try turning debug mode on and send me what it says.

XanderCreates commented 3 months ago

Yes... It should tell you that the server ip is not in the config... probably. Did it say sth in the chat? You can try turning debug mode on and send me what it says.

It doesnt say anything, even with debug mode on.

thebuildcraft commented 3 months ago

Ok. That's weird. Could you maybe send me your log file and the config?

XanderCreates commented 3 months ago

I'm not sure why you'd want my log file, it doesnt seem to print out anything even with debug mode on.. I could send my config though

XanderCreates commented 3 months ago

general.json5:

"enabled": true,
// in ms
"updateDelay": 2000,
"serverEntries": [
    {
        "maptype": "Dynmap",
        "ip": "complementary.emberhost.net",
        "link": "http://136.243.36.97:25911"
    },
    {
        "maptype": "Dynmap",
        "ip": "comps.mp",
        "link": "map.comps.mp"
    }
],
// default Y coordinate for maps that don't provide Y coordinates
"defaultY": 64,
// in sec
"timeUntilAfk": 120,
"unknownAfkStateColor": 6316128,
"AfkColor": 16733440,
"showAfkTimeInTabList": true,
"debugMode": true,
"ignoredServers": [],
// in m
"minDistance": 0,
// in m
"maxDistance": 100000

}

thebuildcraft commented 3 months ago

I think I figured it out... The servers I test on send the position as integers. Your server sends it as floats. The json converter probably doesn't know what to do with this.

thebuildcraft commented 3 months ago

Ok no. The problem is the "https" vs "http"

XanderCreates commented 3 months ago

:pain:

thebuildcraft commented 3 months ago

I will have to make it try both to make it work on all servers

thebuildcraft commented 3 months ago

And also with ints and floats probably...

XanderCreates commented 3 months ago

Also, its not my server, but Sulpher told me to just ping him a few times in case you need to access it (I just help pay for its upkeep)

I think I figured it out... The servers I test on send the position as integers. Your server sends it as floats. The json converter probably doesn't know what to do with this.

Edit: sent the same thing twice in one post

thebuildcraft commented 3 months ago

I will try to make a version of the mod that will work on the server you play on and send it here for you to try. Then I can release it.

XanderCreates commented 3 months ago

ok 👍

XanderCreates commented 3 months ago

Furthermore, I apologize for any inconvenience this may have caused you in your day, and I'd also like to thank you for taking the time to help with this issue on such short notice.

thebuildcraft commented 3 months ago

No Problem. Thank you for helping me find the issue before 100 people think my mod is completely broken and dm me on discord or sth...

XanderCreates commented 3 months ago

np 👍

thebuildcraft commented 3 months ago

Ok. I made a test version. You can try it. But I think it would be easier for me to test it myself, because I have the IntelliJ debugger attached and can see every error.

XanderCreates commented 3 months ago

I don't even see anything added so ill just wait :P

thebuildcraft commented 3 months ago

I don't want to commit the changes until I know that it works.

XanderCreates commented 3 months ago

Perfectly fine

thebuildcraft commented 3 months ago

remote_player_waypoints_for_xaero-1.1.0.jar.zip Here is the test version. You can try it yourself if you want.

XanderCreates commented 3 months ago

Test - Failed

XanderCreates commented 3 months ago

Used Entry 1, Alternative IP, Direct IP Link to Dynmap

thebuildcraft commented 3 months ago

Ok. Did the debug mode say anything? If not, then it would probably be better if I could test it on the smp...

XanderCreates commented 3 months ago

would you like an invite to the Complementary Shaders Discord? image

image

(taken with chatshot]

XanderCreates commented 3 months ago

Ok. Did the debug mode say anything? If not, then it would probably be better if I could test it on the smp...

also I'll see if it did.. one moment

thebuildcraft commented 3 months ago

I'm already on the dc server. I will send a whitelist access request.

XanderCreates commented 3 months ago

alr

XanderCreates commented 3 months ago

Small update for anyone else who isn't me or TBC that might be watching, Including you Sulpher: When using the test version...

In 1.20.1, with a cleared instance (with just basic optimization mods and FAPI) it does not work and will throw an error:

[08:31:54] [Timer-1/INFO]: new link: https://map.comps.mp/up/world/survival/ [08:31:54] [Timer-1/INFO]: [System] [CHAT] ========== [08:31:54] [Timer-1/ERROR]: Uncaught exception in thread "Timer-1" java.lang.NoSuchMethodError: 'java.lang.String net.minecraft.class_2561.method_54160()' at tbc.remote_player_waypoints_for_xaero.connections.MapConnection.HandlePlayerPositions(MapConnection.java:42) ~[remote_player_waypoints_for_xaero-1.1.0.jar:?] at tbc.remote_player_waypoints_for_xaero.connections.DynmapConnection.getPlayerPositions(DynmapConnection.java:113) ~[remote_player_waypoints_for_xaero-1.1.0.jar:?] at tbc.remote_player_waypoints_for_xaero.UpdateTask.run(UpdateTask.java:131) ~[remote_player_waypoints_for_xaero-1.1.0.jar:?] at java.util.TimerThread.mainLoop(Timer.java:566) ~[?:?] at java.util.TimerThread.run(Timer.java:516) ~[?:?]

Still figuring out what 'breaks' the mod in 1.20.4,, On 1.20.4; The Mod works on a Clean Instance that only has: Xaero's World Map (Required(?) For Testing) Xaero's Minimap (Required For Testing) Cloth Config API Fabric API Indium Iris Shaders Lithium Mod Menu Remote Player Waypoints For Xaero's Map (The Mod we're testing, of course.) Sodium

There might be more mods that won't break it. Feel free to mention them!

thebuildcraft commented 3 months ago

Ok. When updating the mods and the fabric version, it works on 1.20.4. But 1.20.1 does not work. I made a new version just for 1.20.1 that works now. remote_player_waypoints_for_xaero-1.1.0.jar.zip

thebuildcraft commented 3 months ago

I uploaded 2 new versions to Modrinth: for MC 1.20.1 for MC 1.20.4 The URL issues on comp SMP should be fixed in both (at least it worked when I tested it...).

Please let me know if it works / still doesn't work for you.

XanderCreates commented 3 months ago

Fix Confirmed! Thank you

thebuildcraft commented 3 months ago

Perfekt. And thanks for testing.