mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 20:53:40 -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.
|
// Start from opposite ends to avoid overlap.
|
||||||
if (global) {
|
if (global) {
|
||||||
BlockDefinition[] defs = BlockDefinition.GlobalDefs;
|
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);
|
BlockID block = Block.FromRaw(b);
|
||||||
if (defs[block] == null) return block;
|
if (defs[block] == null) return block;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
BlockDefinition[] defs = lvl.CustomBlockDefs;
|
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);
|
BlockID block = Block.FromRaw(b);
|
||||||
if (defs[block] == null) return block;
|
if (defs[block] == null) return block;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user