@Override
public void setBedOccupied(IBlockAccess world, int x, int y, int z, EntityPlayer player, boolean occupied)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
BlockVec3 mainBlockPosition = ((TileEntityTelepadFake) tileEntity).mainBlockPosition;
if (mainBlockPosition != null)
{
mainBlockPosition.getBlock(world).setBedOccupied(world, mainBlockPosition.x, mainBlockPosition.y, mainBlockPosition.z, player, occupied);
}
else
{
super.setBedOccupied(world, x, y, z, player, occupied);
}