Skip to content

Commit 04583fa

Browse files
Fix GetBlockName not returning custom block name, if replaced core block.
1 parent f97ab94 commit 04583fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fCraft/World/Map.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public Block GetBlock( Vector3I coords ) {
361361
public static string GetBlockName(World world, Block block) {
362362
Block outBlock;
363363
if (GetBlockByName(world, block.ToString(), false, out outBlock)) {
364-
if (outBlock > MaxCustomBlockType) {
364+
if (world.BlockDefs[(byte)outBlock] != null) {
365365
return world.BlockDefs[(int)outBlock].Name;
366366
}
367367
return outBlock.ToString();

0 commit comments

Comments
 (0)