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

The stacks() function and the linknether() and linkoverworld() function #11

Open
grinheckerdev opened this issue Sep 24, 2024 · 1 comment

Comments

@grinheckerdev
Copy link

the stacks function will have 2 arguments (possibly through a decimal point) count, and stack_size (default 64): it should return two values: round(count/stack_size) and count-round(count/stack_size)* stack_size (aka count mod stack_size). It is useful to calculate the amount of stacks of a given amount of items.
Examples:
stacks(159) = (2; 31) (or = 2.31)
stacks(53, 16) = (3; 5) (or = 3.5)

the linkoverworld(x, z) and linknether(x, z) allow you to calculate the coordinates to link a portal.
linkoverworld(x, z) = (x*8 ; z*8) coordinates of a portal in the overworld by the nether coordinates
linknether(x, z) = (x/8 ; z/8) coordinates of a portal in the nether by the overworld coordinates

@grinheckerdev
Copy link
Author

Might even do a PR, if I'll have time

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