Class RecruitmentInteraction
java.lang.Object
com.minecolonies.api.colony.interactionhandling.AbstractInteractionResponseHandler
com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
com.minecolonies.core.colony.interactionhandling.RecruitmentInteraction
- All Implemented Interfaces:
IInteractionResponseHandler,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Interaction for recruiting visitors
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
parents, validatorId -
Constructor Summary
ConstructorsConstructorDescriptionRecruitmentInteraction(net.minecraft.network.chat.Component inquiry, IChatPriority priority) -
Method Summary
Modifier and TypeMethodDescriptionGen all child interactions related to this.net.minecraft.resources.ResourceLocationGets the icon to render for this interactiongetType()Type id used to deserialize.booleanonClientResponseTriggered(int responseId, net.minecraft.world.entity.player.Player player, ICitizenDataView data, com.ldtteam.blockui.views.BOWindow window) Client side action triggered on a possible response.voidonServerResponseTriggered(int responseId, net.minecraft.world.entity.player.Player player, ICitizenData data) Server side action triggered on a possible response.voidonWindowOpened(com.ldtteam.blockui.views.BOWindow window, ICitizenDataView dataView) Callback for showing the interaction, to set interaction specific stuffMethods inherited from class com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
addParent, deserializeNBT, getId, isValid, isVisible, loadValidator, removeParent, serializeNBTMethods inherited from class com.minecolonies.api.colony.interactionhandling.AbstractInteractionResponseHandler
getInquiry, getPossibleResponses, getPriority, getResponseResult, isPrimaryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.interactionhandling.IInteractionResponseHandler
getInquiry, onClosed, onOpened
-
Constructor Details
-
RecruitmentInteraction
-
RecruitmentInteraction
-
-
Method Details
-
genChildInteractions
Description copied from interface:IInteractionResponseHandlerGen all child interactions related to this.- Returns:
- all child interactions.
-
getType
Description copied from interface:IInteractionResponseHandlerType id used to deserialize.- Returns:
- the string type.
-
onWindowOpened
Description copied from interface:IInteractionResponseHandlerCallback for showing the interaction, to set interaction specific stuff -
onClientResponseTriggered
public boolean onClientResponseTriggered(int responseId, net.minecraft.world.entity.player.Player player, ICitizenDataView data, com.ldtteam.blockui.views.BOWindow window) Description copied from interface:IInteractionResponseHandlerClient side action triggered on a possible response.- Specified by:
onClientResponseTriggeredin interfaceIInteractionResponseHandler- Overrides:
onClientResponseTriggeredin classServerCitizenInteraction- Parameters:
responseId- the clicked index.player- the client side world.data- the citizen data assigned to it.window- the window it was triggered in.- Returns:
- if wishing to continue interacting.
-
onServerResponseTriggered
public void onServerResponseTriggered(int responseId, net.minecraft.world.entity.player.Player player, ICitizenData data) Description copied from interface:IInteractionResponseHandlerServer side action triggered on a possible response.- Specified by:
onServerResponseTriggeredin interfaceIInteractionResponseHandler- Overrides:
onServerResponseTriggeredin classServerCitizenInteraction- Parameters:
responseId- the clicked string response of the player.player- the world it was triggered in.data- the citizen related to it.
-
getInteractionIcon
public net.minecraft.resources.ResourceLocation getInteractionIcon()Description copied from interface:IInteractionResponseHandlerGets the icon to render for this interaction- Returns:
- resourcelocation for icon
-