Just Another Spawner

Just Another Spawner

665k Downloads

Entity Groups

Crudedragos opened this issue ยท 1 comments

commented

Each livinghandler should represent a user definable set of groups.

Many entities to a single group would pose no hurdle. Business as usual.

Single entity in multiple groups will come with caveats. Entities will not remember what group they belong to once spawned (they could be made to, but then what to do when that group is changed? Better just to not to I think). Thus when despawning, which is a lookup from the entity will perform all {despawn} tags for all groups that entity is a part of. Avoidable as long as only one entity group has a {despawn} tag logic.

For counting creature types, if the enitty belongs to multiple groups it will count once for each unique creature type. i.e. if Skeleton belongs to group A which is MONSTER, group B which is MONSTER, group C which is CREATURE. When counting the amount of each creature type in the world Skeleton will count as 1 monster AND 1 creature type. Occupying the space of 2 entities within the cap.

When spawning an entity group with multiple creatures. The question remains if it should spawn packs consisting of randomly selected entities or if it should spawn packs that only consist of a single entity.

i.e. Group contains Skeleton, Zombie, Pig. Assume Packsize of 3 and is always successful.

Random Pack:
Pack 1: Skeleton, Skelton, Zombie
Pack 2: Zombie, Skelton, Zombie
Pack 3: Skeleton, Pig, Pig
Pack 4: Skeleton, Pig, Zombie

Uniform Pack:
Pack 1: Skeleton, Skelton, Skeleton
Pack 2: Pig, Pig, Pig
Pack 3: Zombie, Zombie, Zombie
Pack 4: Pig, Pig, Pig

commented

Closed via f408786