Class AbstractSpellPartCustomizationScreen<T>

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
at.minecraftschurli.mods.arsmagicalegacy.api.client.screen.AbstractSpellPartCustomizationScreen<T>
Type Parameters:
T - The type of the modified data component.
All Implemented Interfaces:
SpellPartCustomizationScreen, net.minecraft.client.gui.components.events.ContainerEventHandler, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Renderable, net.minecraft.client.gui.components.TabOrderedElement
Direct Known Subclasses:
AbstractContainerSpellPartCustomizationScreen

public abstract class AbstractSpellPartCustomizationScreen<T> extends net.minecraft.client.gui.screens.Screen implements SpellPartCustomizationScreen
Dummy implementation of SpellPartCustomizationScreen. This implementation, and as such also SpellPartCustomizationScreen.Factory, expects the screen to modify exactly one data component. It is encouraged to follow that pattern. If you need to store multiple values for a single spell part, adjust the type of the data component to accommodate multiple values. To modify the data component value, change value. When the screen is closed, the change will be pushed to the parent screen automatically.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.gui.screens.Screen

    net.minecraft.client.gui.screens.Screen.NarratableSearchResult

    Nested classes/interfaces inherited from interface SpellPartCustomizationScreen

    SpellPartCustomizationScreen.Factory<T,S>
  • Field Summary

    Fields inherited from class net.minecraft.client.gui.screens.Screen

    FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, renderables, width
  • Constructor Summary

    Constructors
    Constructor
    Description
    AbstractSpellPartCustomizationScreen(net.minecraft.network.chat.Component title, net.minecraft.core.component.DataComponentType<T> type, Function<net.minecraft.core.component.DataComponentType<T>, @Nullable T> valueGetter, BiConsumer<net.minecraft.core.component.DataComponentType<T>, @Nullable T> valueSetter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
     
    void
     

    Methods inherited from class net.minecraft.client.gui.screens.Screen

    added, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, children, clearFocus, extractMenuBackgroundTexture, extractRenderState, extractRenderStateWithTooltipAndSubtitles, extractTransparentBackground, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, handleDelayedNarration, init, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, keyPressed, onFilesDrop, removed, resize, shouldCloseOnEsc, showsActiveEffects, tick, triggerImmediateNarration, updateNarratorStatus

    Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler

    getFocused, isDragging, setDragging, setFocused

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler

    charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, setFocused

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    mouseMoved, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Constructor Details

    • AbstractSpellPartCustomizationScreen

      public AbstractSpellPartCustomizationScreen(net.minecraft.network.chat.Component title, net.minecraft.core.component.DataComponentType<T> type, Function<net.minecraft.core.component.DataComponentType<T>, @Nullable T> valueGetter, BiConsumer<net.minecraft.core.component.DataComponentType<T>, @Nullable T> valueSetter)
      Parameters:
      title - The title of the screen.
      type - The DataComponentType to use.
      valueGetter - A Function that extracts the data component value, for initial storage.
      valueSetter - A BiConsumer that is called when the screen is closed, and is responsible for returning the data component value to the parent screen.
  • Method Details

    • extractBackground

      public void extractBackground(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, float partialTick)
      Overrides:
      extractBackground in class net.minecraft.client.gui.screens.Screen
    • onClose

      public void onClose()
      Overrides:
      onClose in class net.minecraft.client.gui.screens.Screen