mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-02 10:57:11 +00:00
Fix loading schematic files with block data values >127
Minecraft 1.3 introduces several blocks with data values over 127, such as sandstone stairs (128). Since byte is signed, implicit conversion to short results in negative block data values that cause later IndexOutOfBounds exceptions. This change explicitly masks off the extended sign bits so the result is positive.
This commit is contained in:
parent
5e4c809f66
commit
00e6a3aa65
@ -121,7 +121,7 @@ public class MCEditSchematicFormat extends SchematicFormat {
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < rawBlocks.length; ++i) {
|
||||
blocks[i] = rawBlocks[i];
|
||||
blocks[i] = (short) (rawBlocks[i] & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user