From 9518a273570e8d38438c2a29aa10f987e7d44ce1 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 21 Dec 2020 13:54:04 +0000 Subject: Prepare for 1.15+ (#4856) + Add type-safe container for states * Split registry Blocks into BlockTypes, BlockStates so the block types enumeration can be #included without too much penalty * Ensure Registry uses type-safe container --- src/Protocol/Palettes/Palette_1_15.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Protocol/Palettes/Palette_1_15.h') diff --git a/src/Protocol/Palettes/Palette_1_15.h b/src/Protocol/Palettes/Palette_1_15.h index 0a742b766..7fcac7e72 100644 --- a/src/Protocol/Palettes/Palette_1_15.h +++ b/src/Protocol/Palettes/Palette_1_15.h @@ -1,12 +1,13 @@ #pragma once -#include "../../Registries/Items.h" -#include "../../Registries/Statistics.h" +#include "BlockState.h" +#include "Registries/Items.h" +#include "Registries/Statistics.h" namespace Palette_1_15 { - UInt32 FromBlock(short ID); - UInt32 FromItem(Item ID); + UInt32 From(BlockState Block); + UInt32 From(Item ID); UInt32 From(Statistic ID); Item ToItem(UInt32 ID); } -- cgit v1.2.3