MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / useItemOnBlock

Method useItemOnBlock

common/buildcraft/lib/misc/BlockUtil.java:341–348  ·  view source on GitHub ↗
(World world, EntityPlayer player, ItemStack stack, BlockPos pos, EnumFacing direction)

Source from the content-addressed store, hash-verified

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);

Callers 3

handleMethod · 0.95
plantCropMethod · 0.95
updateMethod · 0.95

Calls 3

getItemMethod · 0.65
onItemUseFirstMethod · 0.45
onItemUseMethod · 0.45

Tested by

no test coverage detected