Sigils now don't do their effect when accessing blocks

Should solve #557
This commit is contained in:
Nick 2016-01-09 17:30:10 -08:00
parent b3f965cbe3
commit d868414f5b
6 changed files with 20 additions and 9 deletions

View file

@ -27,8 +27,10 @@ public class ItemSigilBloodLight extends ItemSigilBase
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
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 (world.isRemote)
return false;

View file

@ -18,7 +18,7 @@ public class ItemSigilGreenGrove extends ItemSigilToggleable
}
@Override
public boolean onSigilUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
public boolean onSigilUse(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (applyBonemeal(stack, world, blockPos))
{

View file

@ -10,6 +10,7 @@ import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.event.ForgeEventFactory;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler;
@ -30,7 +31,7 @@ public class ItemSigilLava extends ItemSigilBase
if (movingobjectposition != null)
{
ItemStack ret = net.minecraftforge.event.ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
ItemStack ret = ForgeEventFactory.onBucketUse(player, world, stack, movingobjectposition);
if (ret != null)
return ret;
@ -67,8 +68,10 @@ public class ItemSigilLava extends ItemSigilBase
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
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 (world.isRemote || !BindableHelper.checkAndSetItemOwner(stack, player) || player.isSneaking() || isUnusable(stack))
{
return false;

View file

@ -50,15 +50,17 @@ public class ItemSigilToggleable extends ItemSigilBase
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
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 onSigilUseFirst(stack, player, world, blockPos, side, hitX, hitY, hitZ);
return onSigilUse(stack, player, world, blockPos, side, hitX, hitY, hitZ);
return false;
}
public boolean onSigilUseFirst(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
public boolean onSigilUse(ItemStack itemStack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
{
return false;
}

View file

@ -70,8 +70,10 @@ public class ItemSigilVoid extends ItemSigilBase
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
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 (world.isRemote || !BindableHelper.checkAndSetItemOwner(stack, player) || player.isSneaking() || isUnusable(stack))
{
return false;

View file

@ -68,8 +68,10 @@ public class ItemSigilWater extends ItemSigilBase
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, BlockPos blockPos, EnumFacing side, float hitX, float hitY, float hitZ)
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 (world.isRemote || !BindableHelper.checkAndSetItemOwner(stack, player) || player.isSneaking() || isUnusable(stack))
{
return false;