boolean oneShot = goal.isOneshot();
float reward_value = goal.getReward().floatValue();
float tolerance = goal.getTolerance().floatValue();
float distance = PositionHelper.calcDistanceFromPlayerToPosition(Minecraft.getMinecraft().thePlayer, goal);
if (distance <= tolerance)
<BUG>{
reward.add(this.params.getDimension(), reward_value);
</BUG>
if (oneShot)
goalIterator.remove(); // Safe to do this via an iterator.

boolean oneShot = goal.isOneshot();
float reward_value = goal.getReward().floatValue();
float tolerance = goal.getTolerance().floatValue();
float distance = PositionHelper.calcDistanceFromPlayerToPosition(Minecraft.getMinecraft().thePlayer, goal);
if (distance <= tolerance)
{
float adjusted_reward = adjustAndDistributeReward(reward_value, this.params.getDimension(), goal.getDistribution());
reward.add(this.params.getDimension(), adjusted_reward);
if (oneShot)
goalIterator.remove(); // Safe to do this via an iterator.
