added silent, gravity, fire and age
cos i was bored, and I also checked it off for u
This commit is contained in:
1 parent
8ea79b5837
commit
332c04dd93
3 files changed
+49
-8
No files matched your search
@@ -2729,6 +2729,17 @@ Will make the entity constantly jump if set to true, and will stop the entity fr
|
||||
|
||||
Will make the entity jump once only
|
||||
|
||||
### `modify(e, 'silent', true/false)`
|
||||
|
||||
### `modify(e, 'gravity', true/false)`
|
||||
|
||||
### `modify(e, 'fire', ticks)`
|
||||
|
||||
Will set mob on fire for `ticks` ticks. Set to 0 to extinguish.
|
||||
|
||||
### `modify(e, 'age', age)`
|
||||
|
||||
|
||||
## Entity Events
|
||||
|
||||
There is a number of events that happen to entities that you can attach your own code to in the form of event handlers.
|
||||
|
||||
@@ -464,7 +464,7 @@ Modifies gamemode of player to whatever string (case-insensitive) or number you
|
||||
* 2: adventure
|
||||
* 3: spectator
|
||||
|
||||
### `modify(e, 'jumping', true/false?)`
|
||||
### `modify(e, 'jumping', true/false)`
|
||||
|
||||
Will make the entity constantly jump if set to true, and will stop the entity from jumping if set to false.
|
||||
|
||||
@@ -472,6 +472,16 @@ Will make the entity constantly jump if set to true, and will stop the entity fr
|
||||
|
||||
Will make the entity jump once only
|
||||
|
||||
### `modify(e, 'silent', true/false)`
|
||||
|
||||
### `modify(e, 'gravity', true/false)`
|
||||
|
||||
### `modify(e, 'fire', ticks)`
|
||||
|
||||
Will set mob on fire for `ticks` ticks. Set to 0 to extinguish.
|
||||
|
||||
### `modify(e, 'age', age)`
|
||||
|
||||
## Entity Events
|
||||
|
||||
There is a number of events that happen to entities that you can attach your own code to in the form of event handlers.
|
||||
|
||||
@@ -912,21 +912,41 @@ public class EntityValue extends Value
|
||||
((LivingEntity) e).setJumping(v.getBoolean());
|
||||
});
|
||||
|
||||
put("jump",(e,v)->{//Most *REDACTED* up code in the world
|
||||
put("jump",(e,v)->{
|
||||
jump((LivingEntity)e);
|
||||
});
|
||||
|
||||
put("silent",(e,v)->{
|
||||
e.setSilent(v.getBoolean());
|
||||
});
|
||||
|
||||
put("gravity",(e,v)->{
|
||||
e.setNoGravity(!v.getBoolean());
|
||||
});
|
||||
|
||||
put("invulnerable",(e,v)->{
|
||||
e.setInvulnerable(v.getBoolean());
|
||||
});
|
||||
|
||||
put("fire",(e,v)->{
|
||||
e.setFireTicks((int)NumericValue.asNumber(v).getLong());
|
||||
});
|
||||
|
||||
put("age",(e,v)->{
|
||||
e.age=(int)NumericValue.asNumber(v).getLong();
|
||||
});
|
||||
|
||||
// gamemode [check]
|
||||
// spectate [check]
|
||||
// "fire" []
|
||||
// "extinguish" []
|
||||
// "silent" []
|
||||
// "gravity" []
|
||||
// "invulnerable" []
|
||||
// "fire" [check]
|
||||
// "extinguish" [set fire ticks to 0]
|
||||
// "silent" [check]
|
||||
// "gravity" [check]
|
||||
// "invulnerable" [check]
|
||||
// "dimension" []
|
||||
// "item" []
|
||||
// "count", []
|
||||
// "age", []
|
||||
// "age", [check]
|
||||
// "effect_"name []
|
||||
// "hold" [inventory_set?]
|
||||
// "hold_offhand" [inventory_set?]
|
||||
|
||||
Reference in new issue
Block a user