Added unique names to dev tooltips
This commit is contained in:
parent
39bc22e4b3
commit
48b205fb91
1 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,15 @@ public class ClientHandler {
|
|||
if (WarpDrive.isDev) {// disabled in production
|
||||
Block block = Block.getBlockFromItem(event.itemStack.getItem());
|
||||
if (block != Blocks.air) {
|
||||
try {
|
||||
String uniqueName = Block.blockRegistry.getNameForObject(block);
|
||||
if (uniqueName != null) {
|
||||
event.toolTip.add("" + uniqueName + "");
|
||||
}
|
||||
} catch(Exception exception) {
|
||||
// no operation
|
||||
}
|
||||
|
||||
try {
|
||||
String harvestTool = block.getHarvestTool(event.itemStack.getItemDamage());
|
||||
if (harvestTool != null) {
|
||||
|
|
Loading…
Reference in a new issue