Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lexi-the-cute opened this issue Jun 20, 2024 · 2 comments
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature.

Comments

@lexi-the-cute
Copy link

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

@lexi-the-cute lexi-the-cute added the enhancement An extension of a feature or a new feature. label Jun 20, 2024
@SquidDev SquidDev added the area-Minecraft This affects CC's Minecraft-specific content. label Jun 20, 2024
@Hex4dec
Copy link

Hex4dec commented Sep 3, 2024

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

@lexi-the-cute
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Minecraft This affects CC's Minecraft-specific content. enhancement An extension of a feature or a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants