mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
x
This commit is contained in:
parent
b6701ebb4a
commit
0e555f00cd
@ -496,13 +496,13 @@ namespace MCGalaxy.Commands.CPE {
|
||||
// Start from opposite ends to avoid overlap.
|
||||
if (global) {
|
||||
BlockDefinition[] defs = BlockDefinition.GlobalDefs;
|
||||
for (BlockID b = Block.CpeCount; b < Block.Invalid; b++) {
|
||||
for (BlockID b = Block.CpeCount; b <= Block.MaxRaw; b++) {
|
||||
BlockID block = Block.FromRaw(b);
|
||||
if (defs[block] == null) return block;
|
||||
}
|
||||
} else {
|
||||
BlockDefinition[] defs = lvl.CustomBlockDefs;
|
||||
for (BlockID b = Block.Invalid - 1; b >= Block.CpeCount; b--) {
|
||||
for (BlockID b = Block.MaxRaw; b >= Block.CpeCount; b--) {
|
||||
BlockID block = Block.FromRaw(b);
|
||||
if (defs[block] == null) return block;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user