Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- onComponentAdded(Ref, PlacedByInteractionComponent, Store, CommandBuffer)
- createWarp(ComponentAccessor, Ref, BlockModule.BlockStateInfo, String)
- onComponentSet(Ref, PlacedByInteractionComponent, PlacedByInteractionComponent, Store, CommandBuffer)
- onComponentRemoved(Ref, PlacedByInteractionComponent, Store, CommandBuffer)
- componentType()
- getQuery()
Class CreateWarpWhenTeleporterPlacedSystem
java.lang.Object
com.hypixel.hytale.component.system.System<ChunkStore>
com.hypixel.hytale.component.system.RefChangeSystem<ChunkStore, PlacedByInteractionComponent>
com.hypixel.hytale.builtin.adventure.teleporter.system.CreateWarpWhenTeleporterPlacedSystem
- All Implemented Interfaces:
ISystem<ChunkStore>, QuerySystem<ChunkStore>
public class CreateWarpWhenTeleporterPlacedSystem
extends RefChangeSystem<ChunkStore, PlacedByInteractionComponent>
A system that creates a warp when a teleporter is placed in the world.
-
Field Summary
Fields inherited from interface ISystem
EMPTY_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionCreateWarpWhenTeleporterPlacedSystem(ComponentType<ChunkStore, PlacedByInteractionComponent> placedByInteractionComponentType, ComponentType<ChunkStore, Teleporter> teleporterComponentType, ComponentType<ChunkStore, BlockModule.BlockStateInfo> blockStateInfoComponentType, ComponentType<EntityStore, PlayerRef> playerRefComponentType) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateWarp(ComponentAccessor<ChunkStore> accessor, Ref<ChunkStore> sectionRef, BlockModule.BlockStateInfo blockStateInfo, String name) Called to create a warp based on the given section and block state info.getQuery()voidonComponentAdded(Ref<ChunkStore> ref, PlacedByInteractionComponent placedBy, Store<ChunkStore> chunkStore, CommandBuffer<ChunkStore> commandBuffer) Called after a component has been added to an entity and has aComponentTypethat matchesRefChangeSystem.componentType().voidonComponentRemoved(Ref<ChunkStore> ref, PlacedByInteractionComponent component, 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, PlacedByInteractionComponent oldComponent, PlacedByInteractionComponent newComponent, 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
-
CreateWarpWhenTeleporterPlacedSystem
public CreateWarpWhenTeleporterPlacedSystem(@Nonnull ComponentType<ChunkStore, PlacedByInteractionComponent> placedByInteractionComponentType, @Nonnull ComponentType<ChunkStore, Teleporter> teleporterComponentType, @Nonnull ComponentType<ChunkStore, BlockModule.BlockStateInfo> blockStateInfoComponentType, @Nonnull ComponentType<EntityStore, PlayerRef> playerRefComponentType)
-
-
Method Details
-
onComponentAdded
public void onComponentAdded(@Nonnull Ref<ChunkStore> ref, @Nonnull PlacedByInteractionComponent placedBy, @Nonnull Store<ChunkStore> chunkStore, @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, PlacedByInteractionComponent>- Parameters:
ref- The reference to the affiliated entityplacedBy- The component instance being addedchunkStore- 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.
-
createWarp
public static void createWarp(@Nonnull ComponentAccessor<ChunkStore> accessor, @Nonnull Ref<ChunkStore> sectionRef, @Nonnull BlockModule.BlockStateInfo blockStateInfo, @Nonnull String name) Called to create a warp based on the given section and block state info.- Parameters:
accessor- TheComponentAccessor<ChunkStore>for component access.sectionRef- The reference to the section the teleporter is placed in.blockStateInfo- TheBlockModule.BlockStateInfoof the teleporter block.name- The name of the warp to create.
-
onComponentSet
public void onComponentSet(@Nonnull Ref<ChunkStore> ref, @Nullable PlacedByInteractionComponent oldComponent, @Nonnull PlacedByInteractionComponent newComponent, @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, PlacedByInteractionComponent>- 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 void onComponentRemoved(@Nonnull Ref<ChunkStore> ref, @Nonnull PlacedByInteractionComponent component, @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, PlacedByInteractionComponent>- 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.
-
componentType
- Specified by:
componentTypein classRefChangeSystem<ChunkStore, PlacedByInteractionComponent>- Returns:
- the component type that we're listening for changes from
-
getQuery
-