code fixes

This commit is contained in:
gnembon committed 2020-09-07 15:37:22 -03:00
1 parent 6bf1d46c50
commit a7fcaaddf1
3 files changed
+60 -51

No files matched your search

@@ -343,7 +343,7 @@ public class EntityValue extends Value
put("sneaking", (e, a) -> e.isSneaking()?Value.TRUE:Value.FALSE);
put("sprinting", (e, a) -> e.isSprinting()?Value.TRUE:Value.FALSE);
put("swimming", (e, a) -> e.isSwimming()?Value.TRUE:Value.FALSE);
put("air", (e, a) -> return new NumericValue(e.getAir()));
put("air", (e, a) -> new NumericValue(e.getAir()));
put("persistence", (e, a) -> {
if (e instanceof MobEntity) return new NumericValue(((MobEntity) e).isPersistent());
return Value.NULL;
@@ -1108,7 +1108,7 @@ public class EntityValue extends Value
if(e instanceof PlayerEntity) ((PlayerEntity) e).getHungerManager().setSaturationLevelClient((float)NumericValue.asNumber(v).getLong());
});
put("air", (e, v) -> e.setAir(NumericValue.asNumber(v).getLong()));
put("air", (e, v) -> e.setAir(NumericValue.asNumber(v).getInt()));
put("breaking_progress", (e, a) -> {
if (e instanceof ServerPlayerEntity)