Class RefChangeSystem<ECS_TYPE, T extends Component<ECS_TYPE>>

java.lang.Object
com.hypixel.hytale.component.system.System<ECS_TYPE>
com.hypixel.hytale.component.system.RefChangeSystem<ECS_TYPE,T>
Type Parameters:
ECS_TYPE - The store type
T - The component type being added/removed
All Implemented Interfaces:
ISystem<ECS_TYPE>, QuerySystem<ECS_TYPE>
Direct Known Subclasses:
BeamSystems.Remove, BlockComponentSection.BlockComponentSectionLoadingSystem, CarriedBlockSystems.EntityTrackerAddAndRemove, CarriedBlockSystems.OnPlayerCarryBlockComponentChange, ChunkSpawningSystems.TickingState, ChunkSystems.ResetKeepAliveOnTickingChange, CloseWorldWhenBreakingDeviceSystems.ComponentRemoved, CreateWarpWhenTeleporterPlacedSystem, CreativeEraserSystems.OnPlayerSettingsChange, DamageSystems.InvulnerableBreathing, DeathSystems.OnDeathSystem, DisplayNameSystems.SyncDisplayName, DynamicLightSystems.EntityTrackerRemove, EncounterManagerSystems.TeleportSystem, EnterBedSystem, EntityModule.LegacyUUIDUpdateSystem, EntitySection.EntitySectionLoadingSystem, EntityStatsSystems.EntityTrackerRemove, FlockMembershipSystems.RefChange, HardcoreLivesHud.ShowOnChange, HitboxCollisionSystems.EntityTrackerRemove, InteractionSystems.EntityTrackerRemove, KnockbackPredictionSystems.ClearOnTeleport, KnockbackPredictionSystems.InitKnockback, MarkerReplicationSystems.EntityTrackerAddAndRemove, ModelSystems.ModelChange, ModelSystems.PlayerUpdateMovementManager, ModelSystems.UpdateBoundingBox, MountSystems.MountedEntityDeath, MountSystems.MountedEntitySpectating, MountSystems.PlayerMount, MountSystems.TeleportMountedEntity, MountSystems.TrackedMounted, MountSystems.TrackerRemove, MusicEmitterSystems.Replication, NameplateSystems.EntityTrackerRemove, NPCMountSystems.DismountOnPlayerSpectating, NPCSystems.ModelChangeSystem, NPCSystems.OnTeleportSystem, PlayerSystems.NameplateRefChangeSystem, PositionCacheSystems.OnFlockJoinSystem, PrefabPathSystems.NameplateRefChangeSystem, PrefabPathSystems.WorldGenChangeSystem, PrefabPreviewSystems.PrefabPreviewEntityTrackerRemove, RepulsionSystems.EntityTrackerRemove, RespawnSystems.OnRespawnSystem, RespondToHitSystems.OnPlayerSettingsChange, ServerPlayerListSystems.OnSpectatingChange, SpectatorSystems.OnSpectatingChange, TeleportSystems.MoveSystem, TeleportSystems.PlayerMoveSystem, UIComponentSystems.Remove, WakeUpOnDismountSystem, WeatherSystem.InvalidateWeatherAfterTeleport, WildernessTrackerSystems.ComponentAddRemove, WorldSpawnJobSystems.TickingState

public abstract class RefChangeSystem<ECS_TYPE, T extends Component<ECS_TYPE>> extends System<ECS_TYPE> implements QuerySystem<ECS_TYPE>
A system type that allows for additional logic to be executed upon the addition/removal of a specific component type to an entity
  • Constructor Details

    • RefChangeSystem

      public RefChangeSystem()
  • Method Details

    • componentType

      @Nonnull public abstract ComponentType<ECS_TYPE,T> componentType()
      Returns:
      the component type that we're listening for changes from
    • onComponentAdded

      public abstract void onComponentAdded(@Nonnull Ref<ECS_TYPE> ref, @Nonnull T component, @Nonnull Store<ECS_TYPE> store, @Nonnull CommandBuffer<ECS_TYPE> commandBuffer)
      Called after a component has been added to an entity and has a ComponentType that matches componentType().
      Parameters:
      ref - The reference to the affiliated entity
      component - The component instance being added
      store - The store affiliated with the entity
      commandBuffer - The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component add.
    • onComponentSet

      public abstract void onComponentSet(@Nonnull Ref<ECS_TYPE> ref, @Nullable T oldComponent, @Nonnull T newComponent, @Nonnull Store<ECS_TYPE> store, @Nonnull CommandBuffer<ECS_TYPE> commandBuffer)
      Called after a component has been set on an entity and has a ComponentType that matches componentType().
      Parameters:
      ref - The reference to the affiliated entity
      oldComponent - The old component instance being replaced
      newComponent - The new component instance being set
      store - The store affiliated with the entity
      commandBuffer - The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component set.
    • onComponentRemoved

      public abstract void onComponentRemoved(@Nonnull Ref<ECS_TYPE> ref, @Nonnull T component, @Nonnull Store<ECS_TYPE> store, @Nonnull CommandBuffer<ECS_TYPE> commandBuffer)
      Called after a component has been removed from an entity and has a ComponentType that matches componentType().
      Parameters:
      ref - The reference to the affiliated entity
      component - The component instance being removed
      store - The store affiliated with the entity
      commandBuffer - The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component remove.