use of crazypants.enderio.base.machine.interfaces.IYetaAwareBlock in project EnderIO by SleepyTrousers.
the class ItemYetaWrench method onBlockStartBreak.
@Override
public boolean onBlockStartBreak(@Nonnull ItemStack itemstack, @Nonnull BlockPos pos, @Nonnull EntityPlayer player) {
IBlockState bs = player.world.getBlockState(pos);
Block block = bs.getBlock();
if (player.isSneaking() && block instanceof IYetaAwareBlock && player.capabilities.isCreativeMode) {
block.onBlockClicked(player.world, pos, player);
return true;
}
return false;
}
Aggregations