Skip to content

Commit

Permalink
Update block color for concrete powder & stained terracotta
Browse files Browse the repository at this point in the history
  • Loading branch information
PetteriM1 committed Sep 19, 2023
1 parent 10502df commit cd54766
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/main/java/cn/nukkit/block/BlockConcretePowder.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();
}
}
3 changes: 2 additions & 1 deletion src/main/java/cn/nukkit/block/BlockTerracottaStained.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit cd54766

Please sign in to comment.