ZenUtilsEntityDefinition - friendlyhj/ZenUtils GitHub Wiki
ZenUtilsEntity is an expansion of IEntityDefinition (crafttweaker.entity.IEntityDefinition
). For now, it only adds a way to add tick function to a specific entity definition.
// entityDef.onTick(IEntityTick tickFunction, @Optional int interval);
// IEntityTick is a function handles an IEntity and returns nothing. The function is called at specified intervals for entities of a particular type.
<entity:minecraft:creeper>.onTick(function(entity) {
// the function is only called on server side. No need to check world.remote
print("creeper? " ~ entity.world.time);
}, 50);