Contents
Class WildernessTrackerSystems.ComponentAddRemove<T extends Component<ChunkStore>>
java.lang.Object
com.hypixel.hytale.component.system.System<ChunkStore>
com.hypixel.hytale.component.system.RefChangeSystem<ChunkStore, T>
com.hypixel.hytale.builtin.adventure.wilderness.system.WildernessTrackerSystems.ComponentAddRemove<T>
- Type Parameters:
T- The block component type to track the addition and removal of.
- All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>
- Direct Known Subclasses:
BedMarkerSystems.ComponentSystem, BenchMarkerSystems.ComponentSystem
- Enclosing class:
WildernessTrackerSystems
public abstract static class WildernessTrackerSystems.ComponentAddRemove<T extends Component<ChunkStore>>
extends RefChangeSystem<ChunkStore, T>
System handles the addition and removal of the given block component.
Implementations should subclass this system providing the
ComponentType and a predicate indicating
whether the block is player-owned or not (owned blocks may provide a greater area of effect).-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionfinal ComponentType<ChunkStore, T> final Query<ChunkStore> getQuery()final voidonComponentAdded(Ref<ChunkStore> ref, T component, Store<ChunkStore> store, CommandBuffer<ChunkStore> buffer) Called after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().final voidonComponentRemoved(Ref<ChunkStore> ref, T component, Store<ChunkStore> store, CommandBuffer<ChunkStore> buffer) Called after a component has been removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().final voidonComponentSet(Ref<ChunkStore> ref, T oldComponent, T newComponent, Store<ChunkStore> store, CommandBuffer<ChunkStore> buffer) Called after a component has been set on an entity and has aComponentTypethat matchesRefChangeSystem.componentType().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, test
-
Method Details
-
getQuery
-
componentType
- Specified by:
componentTypein classRefChangeSystem<ChunkStore, T extends Component<ChunkStore>>- Returns:
- the component type that we're listening for changes from
-
onComponentAdded
public final void onComponentAdded(@Nonnull Ref<ChunkStore> ref, @Nonnull T component, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> buffer) Description copied from class:RefChangeSystemCalled after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentAddedin classRefChangeSystem<ChunkStore, T extends Component<ChunkStore>>- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being addedstore- The store affiliated with the entitybuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component add.
-
onComponentRemoved
public final void onComponentRemoved(@Nonnull Ref<ChunkStore> ref, @Nonnull T component, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> buffer) Description copied from class:RefChangeSystemCalled after a component has been removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentRemovedin classRefChangeSystem<ChunkStore, T extends Component<ChunkStore>>- Parameters:
ref- The reference to the affiliated entitycomponent- The component instance being removedstore- The store affiliated with the entitybuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component remove.
-
onComponentSet
public final void onComponentSet(@Nonnull Ref<ChunkStore> ref, @Nullable T oldComponent, @Nonnull T newComponent, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> buffer) Description copied from class:RefChangeSystemCalled after a component has been set on an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentSetin classRefChangeSystem<ChunkStore, T extends Component<ChunkStore>>- 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 entitybuffer- The command buffer to execute tasks. Note: The command buffer tasks are executed after all systems have processed the component set.
-