I have a block in which I want to emit a redstone signal from one side.
This block also has :
@Override
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
EnumFacing face = placer.getHorizontalFacing();
return this.getDefaultState().withProperty(BlockHorizontal.FACING, face);
}
I'm currently trying to use...
@Override
public boolean canProvidePower(IBlockState state) {
return true;
}
public int getWeakPower(IBlockState state, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
return side == EnumFacing.NORTH ? 15 : 0;
}
...to output to the desired side, but since since the block gets placed based on where the player faces, it will always output from the side in relation to Minecraft's NORTH, not the desired block side. What would be a good way of actually having it output the way I need it to?