| 339 | } |
| 340 | |
| 341 | public static boolean useItemOnBlock(World world, EntityPlayer player, ItemStack stack, BlockPos pos, EnumFacing direction) { |
| 342 | boolean done = stack.getItem().onItemUseFirst(stack, player, world, pos, direction, 0.5F, 0.5F, 0.5F, EnumHand.MAIN_HAND) == EnumActionResult.SUCCESS; |
| 343 | |
| 344 | if (!done) { |
| 345 | done = stack.getItem().onItemUse(stack, player, world, pos, EnumHand.MAIN_HAND, direction, 0.5F, 0.5F, 0.5F) == EnumActionResult.SUCCESS; |
| 346 | } |
| 347 | return done; |
| 348 | } |
| 349 | |
| 350 | public static void onComparatorUpdate(World world, BlockPos pos, Block block) { |
| 351 | world.updateComparatorOutputLevel(pos, block); |