geforkt von Mirrors/Paper
Fix custom chunk generators. Fixes SPIGOT-193.
Dieser Commit ist enthalten in:
Ursprung
b6634d7409
Commit
53fc3cf74f
@ -64,9 +64,9 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
}
|
}
|
||||||
char[] secBlkID = new char[4096]; // Allocate blk ID bytes
|
char[] secBlkID = new char[4096]; // Allocate blk ID bytes
|
||||||
short[] bdata = xbtypes[sec];
|
short[] bdata = xbtypes[sec];
|
||||||
// Loop through data, 2 blocks at a time
|
|
||||||
for (int i = 0; i < bdata.length; i++) {
|
for (int i = 0; i < bdata.length; i++) {
|
||||||
secBlkID[i] = (char) ((int)bdata[i] << 4);
|
Block b = Block.getById(bdata[i]);
|
||||||
|
secBlkID[i] = (char) Block.d.b(b.getBlockData());
|
||||||
}
|
}
|
||||||
// Build chunk section
|
// Build chunk section
|
||||||
csect[sec] = new ChunkSection(sec << 4, true, secBlkID);
|
csect[sec] = new ChunkSection(sec << 4, true, secBlkID);
|
||||||
@ -88,7 +88,8 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
|
|
||||||
char[] secBlkID = new char[4096]; // Allocate block ID bytes
|
char[] secBlkID = new char[4096]; // Allocate block ID bytes
|
||||||
for (int i = 0; i < secBlkID.length; i++) {
|
for (int i = 0; i < secBlkID.length; i++) {
|
||||||
secBlkID[i] = (char)(((int) btypes[sec][i]) << 4);
|
Block b = Block.getById(btypes[sec][i]);
|
||||||
|
secBlkID[i] = (char) Block.d.b(b.getBlockData());
|
||||||
}
|
}
|
||||||
csect[sec] = new ChunkSection(sec << 4, true, secBlkID);
|
csect[sec] = new ChunkSection(sec << 4, true, secBlkID);
|
||||||
}
|
}
|
||||||
@ -123,7 +124,9 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
cs = csect[sec] = new ChunkSection(sec << 4, true);
|
cs = csect[sec] = new ChunkSection(sec << 4, true);
|
||||||
csbytes = cs.getIdArray();
|
csbytes = cs.getIdArray();
|
||||||
}
|
}
|
||||||
csbytes[(cy << 8) | (cz << 4) | cx] = (char)((int)blk << 4);
|
|
||||||
|
Block b = Block.getById(blk);
|
||||||
|
csbytes[(cy << 8) | (cz << 4) | cx] = (char) Block.d.b(b.getBlockData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren