From 8c865505274d2763da16c047ac5ffed93442c8ba Mon Sep 17 00:00:00 2001 From: PetteriM1 <26197131+PetteriM1@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:23:48 +0300 Subject: [PATCH] Update block color for concrete powder & stained terracotta (#2151) --- src/main/java/cn/nukkit/block/BlockConcretePowder.java | 7 +++++++ src/main/java/cn/nukkit/block/BlockTerracottaStained.java | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/nukkit/block/BlockConcretePowder.java b/src/main/java/cn/nukkit/block/BlockConcretePowder.java index 111c8d1baec..20811ae3608 100644 --- a/src/main/java/cn/nukkit/block/BlockConcretePowder.java +++ b/src/main/java/cn/nukkit/block/BlockConcretePowder.java @@ -5,6 +5,8 @@ import cn.nukkit.item.ItemTool; import cn.nukkit.level.Level; import cn.nukkit.math.BlockFace; +import cn.nukkit.utils.BlockColor; +import cn.nukkit.utils.DyeColor; /** * Created by CreeperFace on 2.6.2017. @@ -97,4 +99,9 @@ public boolean place(Item item, Block b, Block target, BlockFace face, double fx return true; } + + @Override + public BlockColor getColor() { + return DyeColor.getByWoolData(getDamage()).getColor(); + } } diff --git a/src/main/java/cn/nukkit/block/BlockTerracottaStained.java b/src/main/java/cn/nukkit/block/BlockTerracottaStained.java index 31180029c90..fa538493acb 100644 --- a/src/main/java/cn/nukkit/block/BlockTerracottaStained.java +++ b/src/main/java/cn/nukkit/block/BlockTerracottaStained.java @@ -4,6 +4,7 @@ import cn.nukkit.item.ItemTool; import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.DyeColor; +import cn.nukkit.utils.TerracottaColor; /** * Created on 2015/12/2 by xtypr. @@ -59,7 +60,7 @@ public Item[] getDrops(Item item) { @Override public BlockColor getColor() { - return DyeColor.getByWoolData(getDamage()).getColor(); + return TerracottaColor.getByTerracottaData(getDamage()).getColor(); } public DyeColor getDyeColor() {