Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-1060: Allow custom generators to use block ids > 127 with bytes.
Dieser Commit ist enthalten in:
Ursprung
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());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren