CC: Tweaked

CC: Tweaked

57M Downloads

Expose getLevel(...) to LUA for command computers to query dimension info

lexi-the-cute opened this issue ยท 2 comments

commented

Useful information to include:

  • Allows command computers to obtain their own dimension much like how they can obtain their own position via the commands api

I'm currently implementing a dimension broadcasting addon to my server's gps towers so computers can query their own dimension on top of getting their own positions. Currently I'm planning on implementing the dimension query API to behave like the GPS api, but with it running on rednet with the "gps_dimension" channel instead of using port 65534 like the regular GPS uses. I was researching how the command computers behave to more closely match the GPS api and discovered their is no way to obtain dimension information via the command api

commented

So, I haven't touched this in a while, but I was working on it, I ended up with a non-command computer implementation via channel 65533. I've uploaded a copy of the datapack I wrote to make the gps system more advanced

Advanced-GPS-API.tar.gz

commented

If you don't mind a bit of hardcoding, couldn't you just get the return value (yes, return, not output) of /execute?

Something like if commands.execute("if dimension minecraft:overworld") then --[[ ... ]] end