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

What should happen for y>256 or y<0 #15

Open
rom1504 opened this issue Nov 28, 2015 · 12 comments
Open

What should happen for y>256 or y<0 #15

rom1504 opened this issue Nov 28, 2015 · 12 comments

Comments

@rom1504
Copy link
Member

rom1504 commented Nov 28, 2015

Maybe return air for getters but return an error for setters ?

Maybe this should happen in prismarine-chunk and we just shouldn't do modulus 256 there https://github.com/PrismarineJS/prismarine-world/blob/master/src/world.js#L11

@dcbartlett
Copy link
Contributor

what if the build limit is configured higher than 256?

@rom1504
Copy link
Member Author

rom1504 commented Dec 2, 2015

That's not possible with Minecraft protocol AFAIK, the chunk packet only support up to 16 sections.

@dcbartlett
Copy link
Contributor

hum, i know with the java server and client, i was able to make 512 build limits

@roblabla
Copy link
Member

roblabla commented Dec 2, 2015

@rom1504 vanilla server has an option to make a higher build limit. 256 is just the default IIRC.

@rom1504
Copy link
Member Author

rom1504 commented Dec 2, 2015

Hmm really ? I don't understand how would http://wiki.vg/Protocol#Chunk_Data work then, it takes the bitmap as an unsigned short, so 2 byte, 16bits, 16 sections (=256 max)
Would they change the datatype used for the bitmap automatically ?

Need to experiment about that with the vanilla server + nmp proxy to see what happens

(edit: this issue is related to PrismarineJS/flying-squid#119 (comment) )

@roblabla
Copy link
Member

roblabla commented Dec 2, 2015

@rom1504 I suppose it either always sends it or never sends it...

@rom1504
Copy link
Member Author

rom1504 commented Dec 2, 2015

"always sends it or never sends it" send what ? the bitmap ? it's not optional

Maybe the solution they use is setting "Ground-Up Continuous" to false. ("This is true if the packet represents all sections in this vertical column, where the Primary Bit Mask specifies exactly which sections are included, and which are air")

@roblabla
Copy link
Member

roblabla commented Dec 2, 2015

The content. Not the bitmap. Bitmap defines whether the content is sent or not, so my guess is, if bitmap is too small, the content that couldn't fit in bitmap is either always sent, or never sent. We'd need ot check.

@rom1504
Copy link
Member Author

rom1504 commented Dec 2, 2015

Ah yeah, I see what you mean.

@rom1504
Copy link
Member Author

rom1504 commented Dec 2, 2015

15:42 <+Thinkofname> you can't go bigger than 256
15:48 < rom1504> so server property max-build-height does nothing ?
15:50 < Fenhl> it does nothing when you set it above 256, yes

Not sure who to believe, I guess it needs testing

@Saiv46
Copy link

Saiv46 commented Oct 6, 2021

Now Mojang going to break things with y>-64 and y<319 in 1.18

@mevenG
Copy link

mevenG commented Mar 18, 2023

Uh-oh, looks like 256 isn't enough now .. and the height is hard written, maybe try to get it from bot.game.height, and same for bot.game.minY

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

5 participants