MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / onBlockPlaced

Method onBlockPlaced

src/main/java/net/minecraft/block/BlockVine.java:392–396  ·  view source on GitHub ↗

Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate

(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)

Source from the content-addressed store, hash-verified

390 * IBlockstate
391 */
392 public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
393 {
394 IBlockState iblockstate = this.getDefaultState().withProperty(UP, Boolean.FALSE).withProperty(NORTH, Boolean.FALSE).withProperty(EAST, Boolean.FALSE).withProperty(SOUTH, Boolean.FALSE).withProperty(WEST, Boolean.FALSE);
395 return facing.getAxis().isHorizontal() ? iblockstate.withProperty(getPropertyFor(facing.getOpposite()), Boolean.TRUE) : iblockstate;
396 }
397
398 /**
399 * Get the Item that this Block should drop when harvested.

Callers

nothing calls this directly

Calls 6

withPropertyMethod · 0.95
getPropertyForMethod · 0.95
getDefaultStateMethod · 0.80
isHorizontalMethod · 0.80
getAxisMethod · 0.80
getOppositeMethod · 0.80

Tested by

no test coverage detected