mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix: if a custom block is defined, /b should output its numerical block id.
This commit is contained in:
parent
8f9e8c772a
commit
d6ff32a2d9
@ -450,15 +450,16 @@ namespace MCGalaxy {
|
||||
}
|
||||
|
||||
public string BlockName(byte block, byte extBlock) {
|
||||
if (block == Block.custom_block) {
|
||||
BlockDefinition[] defs = CustomBlockDefs;
|
||||
for (int i = 1; i < 255; i++) {
|
||||
BlockDefinition def = defs[i];
|
||||
if (def == null) continue;
|
||||
if (def.BlockID == extBlock) return def.Name.Replace(" ", "");
|
||||
}
|
||||
if (block != Block.custom_block)
|
||||
return Block.Name(block);
|
||||
|
||||
BlockDefinition[] defs = CustomBlockDefs;
|
||||
for (int i = 1; i < 255; i++) {
|
||||
BlockDefinition def = defs[i];
|
||||
if (def == null) continue;
|
||||
if (def.BlockID == extBlock) return def.Name.Replace(" ", "");
|
||||
}
|
||||
return Block.Name(block);
|
||||
return extBlock.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user