Contents
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 typeT- 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
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ComponentType<ECS_TYPE, T> abstract voidonComponentAdded(Ref<ECS_TYPE> ref, T component, Store<ECS_TYPE> store, CommandBuffer<ECS_TYPE> commandBuffer) Called after a component has been added to an entity and has aComponentTypethat matchescomponentType().abstract voidonComponentRemoved(Ref<ECS_TYPE> ref, T component, Store<ECS_TYPE> store, CommandBuffer<ECS_TYPE> commandBuffer) Called after a component has been removed from an entity and has aComponentTypethat matchescomponentType().abstract voidonComponentSet(Ref<ECS_TYPE> ref, T oldComponent, T newComponent, Store<ECS_TYPE> store, CommandBuffer<ECS_TYPE> commandBuffer) Called after a component has been set on an entity and has aComponentTypethat matchescomponentType().Methods inherited from class System
getComponentRegistrations, getResourceRegistrations, registerResource, registerResourceMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISystem
getDependencies, getGroup, onSystemRegistered, onSystemUnregisteredMethods inherited from interface QuerySystem
getHierarchyScope, getQuery, test
-
Constructor Details
-
RefChangeSystem
public RefChangeSystem()
-
-
Method Details
-
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 aComponentTypethat matchescomponentType().- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being addedstore- The store affiliated with the entitycommandBuffer- 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 aComponentTypethat matchescomponentType().- Parameters:
ref- The reference to the affiliated entityoldComponent- The old component instance being replacednewComponent- The new component instance being setstore- The store affiliated with the entitycommandBuffer- 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 aComponentTypethat matchescomponentType().- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being removedstore- The store affiliated with the entitycommandBuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component remove.
-