mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-21 20:52:11 +00:00
More QOL (#510)
* ItemZoom, hotkeys & more tooltips * fix tooltips * fix hover crash to unnamed item * fix bookmark group with groupIds bigger than 127 --------- Co-authored-by: slprime <[email protected]> Co-authored-by: Martin Robertz <[email protected]>
This commit is contained in:
43 files changed
+2936
-1039
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package codechicken.nei.guihook;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -15,7 +16,7 @@ public interface IContainerTooltipHandler {
|
||||
* Use this to add tooltips for other objects. If the current tip has lines in it after this call, the item tootip
|
||||
* will not be handled. GuiContainerManager.shouldShowTooltip is not enforced here. It is recommended that you make
|
||||
* this check yourself
|
||||
*
|
||||
*
|
||||
* @param gui An instance of the currentscreen
|
||||
* @param mousex The x position of the mouse in pixels from left
|
||||
* @param mousey The y position of the mouse in pixels from top
|
||||
@@ -27,7 +28,7 @@ public interface IContainerTooltipHandler {
|
||||
/**
|
||||
* Use this for modifying the multiline display name of an item which may not necessarily be under the mouse.
|
||||
* GuiContainerManager.shouldShowTooltip is enforced here.
|
||||
*
|
||||
*
|
||||
* @param gui An instance of the currentscreen. If only general information about the item is wanted (Eg.
|
||||
* potion effects) then this may be null.
|
||||
* @param itemstack The ItemStack under the mouse
|
||||
@@ -39,7 +40,7 @@ public interface IContainerTooltipHandler {
|
||||
/**
|
||||
* Use this for modifying the tooltips of items that are under the mouse. GuiContainerManager.shouldShowTooltip is
|
||||
* enforced here.
|
||||
*
|
||||
*
|
||||
* @param gui An instance of the currentscreen
|
||||
* @param itemstack The ItemStack under the mouse
|
||||
* @param currenttip A list of strings, representing each line of the current tooltip as modified by other handlers
|
||||
@@ -47,4 +48,16 @@ public interface IContainerTooltipHandler {
|
||||
*/
|
||||
public List<String> handleItemTooltip(GuiContainer gui, ItemStack itemstack, int mousex, int mousey,
|
||||
List<String> currenttip);
|
||||
|
||||
/**
|
||||
* Use this to specify a list of hotkeys that will work when hovering over an element that is under the mouse
|
||||
* pointer.
|
||||
*
|
||||
* @param gui An instance of the currentscreen
|
||||
* @param mousex The x position of the mouse in pixels from left
|
||||
* @param mousey The y position of the mouse in pixels from top
|
||||
*/
|
||||
default Map<String, String> handleHotkeys(GuiContainer gui, int mousex, int mousey, Map<String, String> hotkeys) {
|
||||
return hotkeys;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user