add block damage to info overlay
This commit is contained in:
parent
ae0b11272d
commit
753f591898
2 changed files with 8 additions and 0 deletions
|
@ -1202,6 +1202,10 @@ public class Client implements IThreadListener {
|
|||
boolean toolReq = block.getMaterial().isToolRequired();
|
||||
boolean harvestable = this.player.canHarvestBlock(block);
|
||||
line2 = Color.BLUE + "Werkzeug" + Color.DARK_GRAY + ": " + (block.getMiningTool() != null ? (toolReq ? (harvestable ? Color.GREEN : Color.RED) : Color.LIGHT_GRAY) + block.getMiningTool().getDisplay() + (block.getMiningTool().isLevelled() ? (toolReq ? (harvestable ? Color.ORK : Color.CRIMSON) : Color.DARK_GRAY) + " Level " + (toolReq ? (harvestable ? Color.DARK_GREEN : Color.DARK_RED) : Color.GRAY) + (block.getMiningLevel() + 1) : "") : Color.GRAY + "Keins");
|
||||
if(this.controller.isHittingBlock()) {
|
||||
bar = 1.0f - this.controller.getDamage(pos);
|
||||
color = (int)(bar * 255.0f) << 8 | (int)((1.0f - bar) * 255.0f) << 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(this.pointed != null && this.pointed.type == ObjectType.ENTITY && this.pointed.entity != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue