Class SimpleNotificationInteraction
java.lang.Object
com.minecolonies.api.colony.interactionhandling.AbstractInteractionResponseHandler
com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
com.minecolonies.core.colony.interactionhandling.StandardInteraction
com.minecolonies.core.colony.interactionhandling.SimpleNotificationInteraction
- All Implemented Interfaces:
IInteractionResponseHandler,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
A simple interaction which displays until an acceptable response is clicked
-
Field Summary
Fields inherited from class com.minecolonies.core.colony.interactionhandling.StandardInteraction
INTERACTION_R_IGNORE, INTERACTION_R_OKAY, INTERACTION_R_REMIND, INTERACTION_R_SKIPFields inherited from class com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
parents, validatorId -
Constructor Summary
ConstructorsConstructorDescriptionSimpleNotificationInteraction(net.minecraft.network.chat.Component inquiry, IChatPriority priority) -
Method Summary
Modifier and TypeMethodDescriptiongetType()Type id used to deserialize.booleanisValid(ICitizenData citizen) Check if this response handler is still valid.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.Methods inherited from class com.minecolonies.core.colony.interactionhandling.StandardInteraction
genChildInteractionsMethods inherited from class com.minecolonies.core.colony.interactionhandling.ServerCitizenInteraction
addParent, deserializeNBT, getId, 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, getInteractionIcon, onClosed, onOpened, onWindowOpened
-
Constructor Details
-
SimpleNotificationInteraction
public SimpleNotificationInteraction(net.minecraft.network.chat.Component inquiry, IChatPriority priority)
-
-
Method Details
-
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.
-
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.
-
getType
Description copied from interface:IInteractionResponseHandlerType id used to deserialize.- Specified by:
getTypein interfaceIInteractionResponseHandler- Overrides:
getTypein classStandardInteraction- Returns:
- the string type.
-
isValid
Description copied from interface:IInteractionResponseHandlerCheck if this response handler is still valid.- Specified by:
isValidin interfaceIInteractionResponseHandler- Overrides:
isValidin classServerCitizenInteraction- Parameters:
citizen- the colony the citizen is in.- Returns:
- true if still valid, else false.
-