prismarine-world icon indicating copy to clipboard operation
prismarine-world copied to clipboard

What should happen for y>256 or y<0

Open rom1504 opened this issue 9 years ago • 12 comments

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

rom1504 avatar Nov 28 '15 21:11 rom1504

what if the build limit is configured higher than 256?

dcbartlett avatar Dec 02 '15 02:12 dcbartlett

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

rom1504 avatar Dec 02 '15 02:12 rom1504

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

dcbartlett avatar Dec 02 '15 04:12 dcbartlett

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

roblabla avatar Dec 02 '15 13:12 roblabla

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 https://github.com/mhsjlw/flying-squid/issues/119#issuecomment-159319424 )

rom1504 avatar Dec 02 '15 13:12 rom1504

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

roblabla avatar Dec 02 '15 13:12 roblabla

"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")

rom1504 avatar Dec 02 '15 13:12 rom1504

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.

roblabla avatar Dec 02 '15 13:12 roblabla

Ah yeah, I see what you mean.

rom1504 avatar Dec 02 '15 14:12 rom1504

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

rom1504 avatar Dec 02 '15 14:12 rom1504

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

Saiv46 avatar Oct 06 '21 13:10 Saiv46

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

mevenG avatar Mar 18 '23 20:03 mevenG