Rewrite Binding system to be fully automated

No more manual handling of binding items to players. Retains all previous functionality.

I have tested on both the Client and Server and it seems to work just fine. If any issues arise from this, do not hesitate to yell at me.

The deprecated methods will be removed after beta.
This commit is contained in:
Nick 2016-02-03 23:14:26 -08:00
parent e219b50589
commit 8c1eaddb97
14 changed files with 152 additions and 165 deletions

View file

@ -37,7 +37,6 @@ public class ItemSigilToggleable extends ItemSigilBase
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
BindableHelper.checkAndSetItemOwner(stack, player);
if (!world.isRemote && !isUnusable(stack))
{
if (player.isSneaking())
@ -52,12 +51,7 @@ public class ItemSigilToggleable extends ItemSigilBase
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
{
super.onItemUse(stack, player, world, blockPos, side, hitX, hitY, hitZ);
if (BindableHelper.checkAndSetItemOwner(stack, player) && ItemBindable.syphonNetwork(stack, player, getLPUsed()))
return onSigilUse(stack, player, world, blockPos, side, hitX, hitY, hitZ);
return false;
return ItemBindable.syphonNetwork(stack, player, getLPUsed()) && onSigilUse(stack, player, world, blockPos, side, hitX, hitY, hitZ);
}
public boolean onSigilUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)