forked from zerofall/EZStorage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cdda3ac
commit 3c4818c
Showing
3 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.zerofall.ezstorage.nei; | ||
|
||
import net.minecraft.client.gui.inventory.GuiContainer; | ||
import net.minecraft.item.ItemStack; | ||
|
||
import com.zerofall.ezstorage.gui.GuiStorageCore; | ||
|
||
import codechicken.nei.guihook.IContainerObjectHandler; | ||
import cpw.mods.fml.common.Optional.Interface; | ||
|
||
@Interface(iface = "codechicken.nei.guihook.IContainerObjectHandler", modid = "NotEnoughItems") | ||
public class NeiHandler implements IContainerObjectHandler { | ||
|
||
@Override | ||
public void guiTick(GuiContainer gui) {} | ||
|
||
@Override | ||
public void refresh(GuiContainer gui) {} | ||
|
||
@Override | ||
public void load(GuiContainer gui) {} | ||
|
||
@Override | ||
public ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) { | ||
if (gui instanceof GuiStorageCore guiStorageCore) { | ||
return guiStorageCore.getMouseOverItem(); | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public boolean objectUnderMouse(GuiContainer gui, int mousex, int mousey) { | ||
return gui instanceof GuiStorageCore guiStorageCore && guiStorageCore.getMouseOverItem() != null; | ||
} | ||
|
||
@Override | ||
public boolean shouldShowTooltip(GuiContainer gui) { | ||
return gui instanceof GuiStorageCore guiStorageCore && guiStorageCore.getMouseOverItem() != null; | ||
} | ||
} |