Skip to content

Commit

Permalink
Fix GetBlockName not returning custom block name, if replaced core bl…
Browse files Browse the repository at this point in the history
…ock.
  • Loading branch information
UnknownShadow200 committed Aug 12, 2017
1 parent f97ab94 commit 04583fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fCraft/World/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public bool SetBlockNoNeighborChange(int x, int y, int z, Block newBlock)
public static string GetBlockName(World world, Block block) {
Block outBlock;
if (GetBlockByName(world, block.ToString(), false, out outBlock)) {
if (outBlock > MaxCustomBlockType) {
if (world.BlockDefs[(byte)outBlock] != null) {
return world.BlockDefs[(int)outBlock].Name;
}
return outBlock.ToString();
Expand Down

0 comments on commit 04583fa

Please sign in to comment.