Skip to content

Commit befbd40

Browse files
committed
feat: add multiple entity instance entries
Add support for spawning multiple instances of entities definitions. This allows users to spawn N copies of an entity either shared across all players or individually per player.
1 parent 2fc321e commit befbd40

File tree

4 files changed

+916
-4
lines changed

4 files changed

+916
-4
lines changed

engine/engine-paper/src/main/kotlin/com/typewritermc/engine/paper/entry/entity/GroupAudienceEntityDisplay.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class GroupAudienceEntityDisplay(
9797
override fun onPlayerRemove(player: Player) {
9898
super.onPlayerRemove(player)
9999
val groupId = group.groupId(player) ?: GroupId(player.uniqueId)
100-
// If no players are considered for this group, we can remove the activity manager
100+
// When there is nobody that can view an entity, we no longer need to track its activity
101101
if (consideredPlayers.none { groupId == group.groupId(it) }) {
102102
activityManagers.remove(groupId)?.dispose(SharedActivityContext(instanceEntryRef, emptyList()))
103103
lastStates.remove(groupId)

0 commit comments

Comments
 (0)