From 26fbc0c231df07b74503f6726ec4b8e809b61d10 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Thu, 2 Mar 2023 19:49:27 +0100 Subject: [PATCH] PixLyzerBlock: load material and hardness from block data by default All pixlyzer data from now on will have the data there. --- .../data/registries/blocks/types/pixlyzer/PixLyzerBlock.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/data/registries/blocks/types/pixlyzer/PixLyzerBlock.kt b/src/main/java/de/bixilon/minosoft/data/registries/blocks/types/pixlyzer/PixLyzerBlock.kt index 3ee268bc1..d8d22082b 100644 --- a/src/main/java/de/bixilon/minosoft/data/registries/blocks/types/pixlyzer/PixLyzerBlock.kt +++ b/src/main/java/de/bixilon/minosoft/data/registries/blocks/types/pixlyzer/PixLyzerBlock.kt @@ -65,8 +65,8 @@ open class PixLyzerBlock( init { val state = data["states"]?.asAnyMap()!!.iterator().next().value.asJsonObject() - material = registries.material[state["material"]]!! - hardness = state["hardness"].toFloat() + material = registries.material[data["material"] ?: state["material"]]!! + hardness = data["hardness"]?.toFloat() ?: state["hardness"].toFloat() } override fun buildState(settings: BlockStateSettings): BlockState {