added ability to modify age of entities
This commit is contained in:
1 parent
770ba7ced1
commit
229a82da90
2 files changed
+7
-3
No files matched your search
@@ -517,6 +517,7 @@ public class EntityValue extends Value
|
||||
|
||||
private static final Map<String, BiConsumer<Entity, Value>> featureModifiers = new HashMap<String, BiConsumer<Entity, Value>>() {{
|
||||
put("remove", (entity, value) -> entity.remove());
|
||||
put("age", (e, v) -> e.age = Math.abs((int)NumericValue.asNumber(v).getLong()) );
|
||||
put("health", (e, v) -> { if (e instanceof LivingEntity) ((LivingEntity) e).setHealth((float) NumericValue.asNumber(v).getDouble()); });
|
||||
put("kill", (e, v) -> e.kill());
|
||||
put("location", (e, v) ->
|
||||
|
||||
Reference in new issue
Block a user