Cap VarInt down to 4 bytes. Early Mojang implementations used 32 BYTES, then they changed it to 5 BYTES. I think they mean 4 BYTES = 32 BITS.
This commit is contained in:
@@ -78,7 +78,7 @@ public abstract class DefinedPacket
|
|||||||
|
|
||||||
out |= ( in & 0x7F ) << ( bytes++ * 7 );
|
out |= ( in & 0x7F ) << ( bytes++ * 7 );
|
||||||
|
|
||||||
if ( bytes > 32 )
|
if ( bytes > 4 )
|
||||||
{
|
{
|
||||||
throw new RuntimeException( "VarInt too big" );
|
throw new RuntimeException( "VarInt too big" );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user