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

PP: Custom map bounds #28

Open
iamgreaser opened this issue Dec 11, 2019 · 0 comments
Open

PP: Custom map bounds #28

iamgreaser opened this issue Dec 11, 2019 · 0 comments

Comments

@iamgreaser
Copy link

iamgreaser commented Dec 11, 2019

This would allow one to restrict players to a subset of the map, which is less difficult than trying to shoehorn in support for smaller (or larger) maps.

A suitable fallback is to teleport older clients back to their last in-bounds position.

struct MapBounds {
   uint8_t extension_id[2] = {0x8?, 0x??};
   uint8_t packet_id = 0x00;
   uint16_t flags;
      // bit 0: 1 = disable visible world wrap
      // bit 1: 1 = show translucent boundary
   int16_t min_x, max_x; // both inclusive, default = (0, 511)
   int16_t min_y, max_y; // both inclusive, default = (0, 511)
} __attribute__((__packed__));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant