made advanced tooltips only show with advanced tooltips enabled

This commit is contained in:
Ellpeck 2016-12-01 18:24:43 +01:00
parent d8af7636ee
commit daf51f7929

View file

@ -55,7 +55,7 @@ public class ClientEvents{
@SubscribeEvent @SubscribeEvent
public void onTooltipEvent(ItemTooltipEvent event){ public void onTooltipEvent(ItemTooltipEvent event){
//Advanced Item Info //Advanced Item Info
if(StackUtil.isValid(event.getItemStack())){ if(event.isShowAdvancedItemTooltips() && StackUtil.isValid(event.getItemStack())){
if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){ if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){
if(GuiScreen.isCtrlKeyDown()){ if(GuiScreen.isCtrlKeyDown()){
event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":"); event.getToolTip().add(TextFormatting.DARK_GRAY+""+TextFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID+".extraInfo.desc")+":");