BlockCoord railCoord = new BlockCoord(transciever).getLocation(ForgeDirection.UP);
int meta = worldObj.getBlockMetadata(railCoord.x, railCoord.y, railCoord.z);
double buf = 1;
ForgeDirection dir = BlockEnderRail.getDirection(meta);
Vector3d offset = ForgeDirectionOffsets.forDirCopy(dir);
offset.scale(buf);
offset.x = Math.abs(offset.x);
offset.z = Math.abs(offset.z);
List res = worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(railCoord.x - offset.x, railCoord.y,
railCoord.z - offset.z, railCoord.x + 1 + offset.x, railCoord.y + 1, railCoord.z + 1 + offset.z));
return res == null || res.isEmpty();