From f2943c6809dcad1534cb39d8cfce0b0e8bf2bf6f Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Mon, 11 Dec 2023 00:23:53 -0800 Subject: [PATCH] feat: Improved debug messages for block ids --- world/world_position.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/world/world_position.go b/world/world_position.go index f4fe8c5..5be2f73 100644 --- a/world/world_position.go +++ b/world/world_position.go @@ -49,3 +49,14 @@ const ( Empty BlockID = iota Generic ) + +func (id BlockID) String() string { + switch id { + case Empty: + return "Empty" + case Generic: + return "Generic" + default: + panic(fmt.Sprintf("Unknown block id: %v", uint8(id))) + } +}