diff options
author | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
---|---|---|
committer | anon5 <anon5clam@protonmail.com> | 2021-06-22 16:30:50 +0000 |
commit | f967a747e4ae01fba3a6c3fd693d0e753faf3ae4 (patch) | |
tree | 22d628df079bb5cac93cc2338cfbe585ff8a2763 /drawtype_string.go | |
parent | 425da65ed46061303604610bb539d6495b2b1f3f (diff) |
Add String methods to some types using stringer and fix some minor defects
Diffstat (limited to 'drawtype_string.go')
-rw-r--r-- | drawtype_string.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drawtype_string.go b/drawtype_string.go new file mode 100644 index 0000000..4bc1593 --- /dev/null +++ b/drawtype_string.go @@ -0,0 +1,40 @@ +// Code generated by "stringer -trimprefix Draw -type DrawType"; DO NOT EDIT. + +package mt + +import "strconv" + +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[DrawCube-0] + _ = x[DrawNothing-1] + _ = x[DrawLiquid-2] + _ = x[DrawFlowing-3] + _ = x[DrawLikeGlass-4] + _ = x[DrawAllFaces-5] + _ = x[DrawAllFacesOpt-6] + _ = x[DrawTorch-7] + _ = x[DrawSign-8] + _ = x[DrawPlant-9] + _ = x[DrawFence-10] + _ = x[DrawRail-11] + _ = x[DrawNodeBox-12] + _ = x[DrawGlassFrame-13] + _ = x[DrawFire-14] + _ = x[DrawGlassFrameOpt-15] + _ = x[DrawMesh-16] + _ = x[DrawRootedPlant-17] +} + +const _DrawType_name = "CubeNothingLiquidFlowingLikeGlassAllFacesAllFacesOptTorchSignPlantFenceRailNodeBoxGlassFrameFireGlassFrameOptMeshRootedPlant" + +var _DrawType_index = [...]uint8{0, 4, 11, 17, 24, 33, 41, 52, 57, 61, 66, 71, 75, 82, 92, 96, 109, 113, 124} + +func (i DrawType) String() string { + if i >= DrawType(len(_DrawType_index)-1) { + return "DrawType(" + strconv.FormatInt(int64(i), 10) + ")" + } + return _DrawType_name[_DrawType_index[i]:_DrawType_index[i+1]] +} |