Updating logger to support different types (#452) fixes #437

* Updating logger to support different types

* changing to ouptut info by default

* updating docs with air

* adding air modify definition
This commit is contained in:
Ghoulboy authored and GitHub committed 2020-09-07 15:19:28 -03:00
1 parent d072e4946a
commit 26169f042e
5 files changed
+63 -14

No files matched your search

@@ -343,6 +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("persistence", (e, a) -> {
if (e instanceof MobEntity) return new NumericValue(((MobEntity) e).isPersistent());
return Value.NULL;
@@ -1107,6 +1108,8 @@ 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("breaking_progress", (e, a) -> {
if (e instanceof ServerPlayerEntity)
{