Search in sources :

Example 1 with NamedPoint

use of com.microsoft.Malmo.Schemas.NamedPoint in project malmo by Microsoft.

the class ObservationFromDistanceImplementation method writeObservationsToJSON.

@Override
public void writeObservationsToJSON(JsonObject json, MissionInit missionInit) {
    for (NamedPoint marker : odparams.getMarker()) {
        EntityPlayerSP player = Minecraft.getMinecraft().player;
        json.addProperty("distanceFrom" + makeSafe(marker.getName()), PositionHelper.calcDistanceFromPlayerToPosition(player, marker));
    }
}
Also used : NamedPoint(com.microsoft.Malmo.Schemas.NamedPoint) EntityPlayerSP(net.minecraft.client.entity.EntityPlayerSP)

Aggregations

NamedPoint (com.microsoft.Malmo.Schemas.NamedPoint)1 EntityPlayerSP (net.minecraft.client.entity.EntityPlayerSP)1