Class RuleListMixin
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.AbstractSelectionList<net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen.RuleEntry>
com.glektarssza.expandedgamerules.mixins.vanilla.client.RuleListMixin
- All Implemented Interfaces:
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,net.minecraft.client.gui.narration.NarratableEntry,net.minecraft.client.gui.narration.NarrationSupplier
public abstract class RuleListMixin
extends net.minecraft.client.gui.components.AbstractSelectionList<net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen.RuleEntry>
A mixin into the
EditGameRulesScreen.RuleEntry class which augments its functionality.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.client.gui.components.AbstractSelectionList
net.minecraft.client.gui.components.AbstractSelectionList.Entry<E extends net.minecraft.client.gui.components.AbstractSelectionList.Entry<E>>Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority -
Field Summary
Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList
centerListVertically, headerHeight, height, itemHeight, minecraft, width, x0, x1, y0, y1Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionRuleListMixin(net.minecraft.client.Minecraft minecraft, int width, int height, int top, int bottom, int itemHeight) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidignoreKeysWithCustomCategories(Map.Entry<net.minecraft.world.level.GameRules.Key<?>, net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen.RuleEntry> entry, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Mixin to the lambda used in theEditGameRulesScreen.RuleListconstructor to process gamerule entries being loaded.voidinitCustomCategories(net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen screen, net.minecraft.world.level.GameRules gameRules, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Mixin to theEditGameRulesScreen.RuleListconstructor to inject custom categories into the list.Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList
addEntry, addEntryToTop, centerScrollOn, children, clearEntries, clickedHeader, enableScissor, ensureVisible, getEntry, getEntryAtPosition, getFirstElement, getFocused, getHovered, getItemCount, getMaxPosition, getMaxScroll, getRectangle, getRowBottom, getRowLeft, getRowRight, getRowTop, getRowWidth, getScrollAmount, getScrollbarPosition, getScrollBottom, getSelected, isMouseOver, isSelectedItem, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, narrateListElementPosition, narrationPriority, nextEntry, nextEntry, nextEntry, remove, removeEntry, removeEntryFromTop, render, renderBackground, renderDecorations, renderHeader, renderItem, renderList, renderSelection, replaceEntries, setFocused, setLeftPos, setRenderBackground, setRenderHeader, setRenderSelection, setRenderTopAndBottom, setScrollAmount, setSelected, updateScrollingState, updateSizeMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
isDragging, setDraggingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActiveMethods inherited from interface net.minecraft.client.gui.narration.NarrationSupplier
updateNarrationMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Constructor Details
-
RuleListMixin
public RuleListMixin(net.minecraft.client.Minecraft minecraft, int width, int height, int top, int bottom, int itemHeight) Create a new instance.- Parameters:
minecraft- The Minecraft instance.width- The width of the item.height- The height of the item.top- The top position of them item.bottom- The bottom position of them item.itemHeight- The height of the item.
-
-
Method Details
-
initCustomCategories
public void initCustomCategories(net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen screen, net.minecraft.world.level.GameRules gameRules, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Mixin to theEditGameRulesScreen.RuleListconstructor to inject custom categories into the list.- Parameters:
screen- The screen being initialized.gameRules- The gamerules being loaded.ci- The callback information.
-
ignoreKeysWithCustomCategories
public void ignoreKeysWithCustomCategories(Map.Entry<net.minecraft.world.level.GameRules.Key<?>, net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen.RuleEntry> entry, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) Mixin to the lambda used in theEditGameRulesScreen.RuleListconstructor to process gamerule entries being loaded. Filters out gamerule entries that have custom categories so they can be loaded later on by theinitCustomCategories(net.minecraft.client.gui.screens.worldselection.EditGameRulesScreen, net.minecraft.world.level.GameRules, org.spongepowered.asm.mixin.injection.callback.CallbackInfo)injection.- Parameters:
entry- The entry being processed.ci- The callback information.
-