Eroxen / Microbuilder

Microbuilder datapack for Minecraft
MIT License
0 stars 0 forks source link

Distance based block misalignment #1

Open Erokaution opened 1 year ago

Erokaution commented 1 year ago

Using microbuilder at all given scales works as expected near 0x, 0z. The farther out you go, the more the blocks will all be misaligned to the games natural grid. You don't need to go particularly far out by Minecraft standards either, just a few thousand is enough to make a noticeable sliver of misalignment.

Here's around 2k in both directions. 2k

5k. 5k

10k. 10k

50k. 50k

Eroxen commented 1 year ago

Thanks for taking the time to write a bug report about this! I'm guessing that his happens because I store the position (which is normally of the type Double) in a scoreboard (which is an Int). Unfortunately there's not really any way to perform math on numbers in Minecraft other than using scoreboards, so precision issues is something we have to deal with all the time.

I've not touched Microbuilder in a few months, but if I remember correctly I summon each of the block display entities at the centre of where the block actually displays. A possible fix may be to always summon the block display entities at the centre of the block space, and use the transformation offset to render them in the right place. I don't know if I'm going to work on Microbuilder again any time soon though.