mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
SPIGOT-1060: Allow custom generators to use block ids > 127 with bytes.
This commit is contained in:
parent
09ddd9b35e
commit
87b9f46d72
@ -88,7 +88,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
|
||||
char[] secBlkID = new char[4096]; // Allocate block ID bytes
|
||||
for (int i = 0; i < secBlkID.length; i++) {
|
||||
Block b = Block.getById(btypes[sec][i]);
|
||||
Block b = Block.getById(btypes[sec][i] & 0xFF);
|
||||
secBlkID[i] = (char) Block.d.b(b.getBlockData());
|
||||
}
|
||||
csect[sec] = new ChunkSection(sec << 4, true, secBlkID);
|
||||
@ -125,7 +125,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
||||
csbytes = cs.getIdArray();
|
||||
}
|
||||
|
||||
Block b = Block.getById(blk);
|
||||
Block b = Block.getById(blk & 0xFF);
|
||||
csbytes[(cy << 8) | (cz << 4) | cx] = (char) Block.d.b(b.getBlockData());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user