}
// Called in Block.collisionRayTrace.
public MovingObjectPosition rayTrace(World world, int x, int y, int z, Vec3 start, Vec3 end) {
AxisAlignedBB aabb = tileEntity.getBlockType().getCollisionBoundingBoxFromPool(world, x, y, z);
MovingObjectPosition target = aabb.calculateIntercept(start, end);
EntityPlayer player = playerLocal.get();
double distance = ((target != null) ? start.distanceTo(target.hitVec) : Double.MAX_VALUE);
for (Attachment attachment : this) {
if (!attachment.boxVisible(player)) continue;
AxisAlignedBB attachmentBox = attachment.getHighlightBox();
MovingObjectPosition attachmentTarget = attachmentBox.calculateIntercept(start, end);
if (attachmentTarget == null) continue;
double attachmentDistance = start.distanceTo(attachmentTarget.hitVec);
if (attachmentDistance >= distance) continue;
distance = attachmentDistance;
target = attachmentTarget;