refactor(Minecraft.World): Implement LCEMP changes.

This commit is contained in:
2026-07-13 00:14:53 +03:00
parent 3fce0538c5
commit 21e2add09a
64 changed files with 655 additions and 372 deletions
+10 -5
View File
@@ -9,12 +9,17 @@
//buf - the input buffer.
//offset - the offset in the buffer of the first byte to read.
//length - the maximum number of bytes to read from the buffer.
ByteArrayInputStream::ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length)
: pos( offset ), count( min( offset+length, buf.length ) ), mark( offset )
{
this->buf = buf;
ByteArrayInputStream::ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length)
: pos( offset ), mark( offset )
{
if( offset > buf.length )
count = buf.length;
else if( length > buf.length - offset )
count = buf.length;
else
count = offset + length;
this->buf = buf;
}
//Creates a ByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied.
//The initial value of pos is 0 and the initial value of count is the length of buf.
//Parameters: