public class InteractionModule extends JavaPlugin
Class InteractionModule. Provides interactionmodule functionality for the Hytale server.
java.lang.Object > JavaPlugin > InteractionModule
Field Summary
activeHotbarSlot
Field activeHotbarSlot.
mouseButtonType
Field mouseButtonType.
inventory
Field inventory.
itemInHand
Field itemInHand.
itemInOffHand
Field itemInOffHand.
primaryItem
Field primaryItem.
secondaryItem
Field secondaryItem.
worldInteraction_
Field worldInteraction_.
blockPositionPacket
Field blockPositionPacket.
entityComponentStore
Field entityComponentStore.
targetBlock
Field targetBlock.
entityReference
Field entityReference.
cameraManagerComponent
Field cameraManagerComponent.
Method Detail
setup
void
setup
()
Method setup.
handledLoadedRootInteractions
Method handledLoadedRootInteractions.
- Parameters:
@Nonnull final LoadedAssetsEventevent
handledLoadedInteractions
Method handledLoadedInteractions.
- Parameters:
@Nonnull final LoadedAssetsEventevent
handledRemovedInteractions
Method handledRemovedInteractions.
- Parameters:
@Nonnull final RemovedAssetsEventevent
doMouseInteraction
void
doMouseInteraction
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor, @Nonnull final MouseInteraction packet, @Nonnull final Player playerComponent, @Nonnull final PlayerRef playerRefComponent)
Method doMouseInteraction.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor@Nonnull final MouseInteractionpacket@Nonnull final PlayerplayerComponent@Nonnull final PlayerRefplayerRefComponent
if
else
if
(mouseButtonType == MouseButtonType.Right && secondaryItem != null)
Method if.
- Parameters:
mouseButtonType == MouseButtonType.Right && secondaryItem !=null
PlayerMouseButtonEvent
new
PlayerMouseButtonEvent
(ref, playerComponent, playerRefComponent, packet.clientTimestamp, item, targetBlock, targetEntity, packet.screenPoint, packet.mouseButton)
Method PlayerMouseButtonEvent.
- Parameters:
refrefplayerComponentplayerComponentplayerRefComponentplayerRefComponentpacket.clientTimestamppacket.clientTimestampitemitemtargetBlocktargetBlocktargetEntitytargetEntitypacket.screenPointpacket.screenPointpacket.mouseButtonpacket.mouseButton
PlayerMouseMotionEvent
new
PlayerMouseMotionEvent
(ref, playerComponent, packet.clientTimestamp, item, targetBlock, targetEntity, packet.screenPoint, packet.mouseMotion)
Method PlayerMouseMotionEvent.
- Parameters:
refrefplayerComponentplayerComponentpacket.clientTimestamppacket.clientTimestampitemitemtargetBlocktargetBlocktargetEntitytargetEntitypacket.screenPointpacket.screenPointpacket.mouseMotionpacket.mouseMotion
Vector2d
new
Vector2d
(packet.screenPoint.x, packet.screenPoint.y)
Method Vector2d.
- Parameters:
packet.screenPoint.xpacket.screenPoint.xpacket.screenPoint.ypacket.screenPoint.y
getChainingDataComponent
ChainingInteraction.Data>
getChainingDataComponent
()
Method getChainingDataComponent.
getInteractionsComponentType
Interactions>
getInteractionsComponentType
()
Method getInteractionsComponentType.
getInteractionManagerComponent
InteractionManager>
getInteractionManagerComponent
()
Method getInteractionManagerComponent.
getPlacedByComponentType
PlacedByInteractionComponent>
getPlacedByComponentType
()
Method getPlacedByComponentType.
getBlockCounterResourceType
BlockCounter>
getBlockCounterResourceType
()
Method getBlockCounterResourceType.
getTrackedPlacementComponentType
TrackedPlacement>
getTrackedPlacementComponentType
()
Method getTrackedPlacementComponentType.