Contents
Class MusicEmitterSystems.Replication
java.lang.Object
com.hypixel.hytale.component.system.System<ChunkStore>
com.hypixel.hytale.component.system.RefChangeSystem<ChunkStore, MusicEmitterBlock>
com.hypixel.hytale.builtin.audio.systems.MusicEmitterSystems.Replication
- All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>
- Enclosing class:
MusicEmitterSystems
public static class MusicEmitterSystems.Replication
extends RefChangeSystem<ChunkStore, MusicEmitterBlock>
Replicates runtime component add/remove to viewers.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionReplication(ComponentType<ChunkStore, MusicEmitterBlock> musicEmitterBlockComponentType) -
Method Summary
Modifier and TypeMethodDescriptiongetQuery()voidonComponentAdded(Ref<ChunkStore> ref, MusicEmitterBlock emitter, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) Called after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().voidonComponentRemoved(Ref<ChunkStore> ref, MusicEmitterBlock emitter, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) Called after a component has been removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().voidonComponentSet(Ref<ChunkStore> ref, MusicEmitterBlock oldEmitter, MusicEmitterBlock newEmitter, Store<ChunkStore> store, CommandBuffer<ChunkStore> commandBuffer) 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
-
Constructor Details
-
Replication
public Replication(@Nonnull ComponentType<ChunkStore, MusicEmitterBlock> musicEmitterBlockComponentType)
-
-
Method Details
-
getQuery
-
componentType
- Specified by:
componentTypein classRefChangeSystem<ChunkStore, MusicEmitterBlock>- Returns:
- the component type that we're listening for changes from
-
onComponentAdded
public void onComponentAdded(@Nonnull Ref<ChunkStore> ref, @Nonnull MusicEmitterBlock emitter, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) Description copied from class:RefChangeSystemCalled after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentAddedin classRefChangeSystem<ChunkStore, MusicEmitterBlock>- Parameters:
ref- The reference to the affiliated entityemitter- 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 void onComponentSet(@Nonnull Ref<ChunkStore> ref, @Nullable MusicEmitterBlock oldEmitter, @Nonnull MusicEmitterBlock newEmitter, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) Description copied from class:RefChangeSystemCalled after a component has been set on an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentSetin classRefChangeSystem<ChunkStore, MusicEmitterBlock>- Parameters:
ref- The reference to the affiliated entityoldEmitter- The old component instance being replacednewEmitter- 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 void onComponentRemoved(@Nonnull Ref<ChunkStore> ref, @Nonnull MusicEmitterBlock emitter, @Nonnull Store<ChunkStore> store, @Nonnull CommandBuffer<ChunkStore> commandBuffer) Description copied from class:RefChangeSystemCalled after a component has been removed from an entity and has aComponentTypethat matchesRefChangeSystem.componentType().- Specified by:
onComponentRemovedin classRefChangeSystem<ChunkStore, MusicEmitterBlock>- Parameters:
ref- The reference to the affiliated entityemitter- 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.
-