@Override public Optional<ImmutableEyeLocationData> with( Key<? extends BaseValue<?>> key, Object value, ImmutableEyeLocationData immutable) { final Vector3d entityLocation = ((ImmutableSpongeEyeLocationData) immutable).getEntityLocation(); if (Keys.EYE_HEIGHT.equals(key)) { return Optional.<ImmutableEyeLocationData>of( new ImmutableSpongeEyeLocationData(entityLocation, ((Number) value).doubleValue())); } else if (Keys.EYE_LOCATION.equals(key)) { return Optional.<ImmutableEyeLocationData>of( new ImmutableSpongeEyeLocationData( entityLocation, ((Vector3d) value).getY() - entityLocation.getY())); } return Optional.absent(); }