Implemented ghost items for the inventory - will be adjusted.
This commit is contained in:
parent
ec7676a69c
commit
ac919c7882
12 changed files with 424 additions and 66 deletions
|
@ -1,10 +1,31 @@
|
|||
package WayofTime.bloodmagic.util.handler;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import WayofTime.bloodmagic.util.GhostItemHelper;
|
||||
|
||||
public class ClientEventHandler
|
||||
{
|
||||
// @SubscribeEvent
|
||||
// public void onFOVUpdate(FOVUpdateEvent event)
|
||||
// {
|
||||
// event.newfov = event.fov;
|
||||
// }
|
||||
@SubscribeEvent
|
||||
public void onTooltipEvent(ItemTooltipEvent event)
|
||||
{
|
||||
ItemStack stack = event.itemStack;
|
||||
if (stack == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (GhostItemHelper.hasGhostAmount(stack))
|
||||
{
|
||||
int amount = GhostItemHelper.getItemGhostAmount(stack);
|
||||
if (amount == 0)
|
||||
{
|
||||
event.toolTip.add("Everything");
|
||||
} else
|
||||
{
|
||||
event.toolTip.add("Ghost item amount: " + amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue