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

Block placement constraints #137

Open
1 of 3 tasks
Unarelith opened this issue Jul 5, 2020 · 0 comments
Open
1 of 3 tasks

Block placement constraints #137

Unarelith opened this issue Jul 5, 2020 · 0 comments

Comments

@Unarelith
Copy link
Owner

Unarelith commented Jul 5, 2020

Mods should be able to define constraints for their blocks, for example:

mod:block {
   id = "default:potato",

   -- ...

   constraints = {
      block_whitelist = {
          {{0, 0, -1}, "default:farmland"} -- check that block below is default:farmland
      },
   },

   -- ...
}

It should be possible to define whitelists, blacklists, use offset to check blocks, use groups, and maybe:

sometimes things are more complex, like, "you can place X on block Y, but only if there's no block Z below that"

Checklist:

  • Block placement constraints with blacklist/whitelists (final version)
  • Allow using groups
  • Server-side check (probably in World directly)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant