File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/main/java/com/cleanroommc/modularui/test Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1313
1414public class EventHandler {
1515
16+ public static boolean enabledRichTooltipEventTest = false ;
17+
1618 @ SubscribeEvent
1719 public static void onItemUse (PlayerInteractEvent .RightClickItem event ) {
1820 if (event .getEntityPlayer ().getEntityWorld ().isRemote && event .getItemStack ().getItem () == Items .DIAMOND ) {
@@ -28,8 +30,10 @@ public static void onItemUse(PlayerInteractEvent.RightClickItem event) {
2830
2931 @ SubscribeEvent
3032 public static void onRichTooltip (RichTooltipEvent .Pre event ) {
31- event .getTooltip ()
32- .add (IKey .str ("Powered By: " ).style (TextFormatting .GOLD , TextFormatting .ITALIC ))
33- .add (GuiTextures .MUI_LOGO .asIcon ().size (18 )).newLine ();
33+ if (enabledRichTooltipEventTest ) {
34+ event .getTooltip ()
35+ .add (IKey .str ("Powered By: " ).style (TextFormatting .GOLD , TextFormatting .ITALIC ))
36+ .add (GuiTextures .MUI_LOGO .asIcon ().size (18 )).newLine ();
37+ }
3438 }
3539}
You can’t perform that action at this time.
0 commit comments