Fix #381
This commit is contained in:
parent
8632aeb253
commit
f87cf547ac
1 changed files with 30 additions and 0 deletions
|
@ -156,6 +156,36 @@ public class SigilOfHolding extends EnergyItems
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||||
|
{
|
||||||
|
if (checkAndSetItemOwner(stack, player))
|
||||||
|
{
|
||||||
|
int currentSlot = getCurrentItem(stack);
|
||||||
|
ItemStack[] inv = getInternalInventory(stack);
|
||||||
|
|
||||||
|
if (inv == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack itemUsed = inv[currentSlot];
|
||||||
|
|
||||||
|
if (itemUsed == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean bool = itemUsed.getItem().onItemUseFirst(stack, player, world, x, y, z, side, hitX, hitY, hitZ);
|
||||||
|
|
||||||
|
saveInventory(stack, inv);
|
||||||
|
|
||||||
|
return bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public static int next(int mode)
|
public static int next(int mode)
|
||||||
{
|
{
|
||||||
int index = mode + 1;
|
int index = mode + 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue