Class InWorldGameRulesScreen
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.screens.Screen
net.minecraft.client.gui.screens.worldselection.AbstractGameRulesScreen
net.minecraft.client.gui.screens.options.InWorldGameRulesScreen
- All Implemented Interfaces:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement, HasGamemasterPermissionReaction
public class InWorldGameRulesScreen
extends AbstractGameRulesScreen
implements HasGamemasterPermissionReaction
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractGameRulesScreen
AbstractGameRulesScreen.BooleanRuleEntry, AbstractGameRulesScreen.CategoryRuleEntry, AbstractGameRulesScreen.EntryFactory<T>, AbstractGameRulesScreen.GameRuleEntry, AbstractGameRulesScreen.IntegerRuleEntry, AbstractGameRulesScreen.RuleEntry, AbstractGameRulesScreen.RuleListNested classes/interfaces inherited from class Screen
Screen.NarratableSearchResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientPacketListenerprivate final Screenprivate @Nullable LoadingDotsWidgetprivate static final Componentprivate booleanFields inherited from class AbstractGameRulesScreen
doneButton, gameRules, layout, ruleList, searchBox, TITLEFields inherited from class Screen
FADE_IN_TIME, font, FOOTER_SEPARATOR, HEADER_SEPARATOR, height, INWORLD_FOOTER_SEPARATOR, INWORLD_HEADER_SEPARATOR, MENU_BACKGROUND, minecraft, narratorButton, renderables, screenExecutor, title, width -
Constructor Summary
ConstructorsConstructorDescriptionInWorldGameRulesScreen(ClientPacketListener connection, Consumer<Optional<GameRules>> exitCallback, Screen lastScreen) -
Method Summary
Modifier and TypeMethodDescriptionprivate <T> voidcollectChangedGameRule(GameRule<T> rule, T initialValue, List<ServerboundSetGameRulePacket.Entry> entries) private <T> voidcollectChangedGameRuleWithCast(GameRule<T> rule, Object initialValue, List<ServerboundSetGameRulePacket.Entry> entries) private <T> booleanhasGameRuleChanged(GameRule<T> rule, Object initialValue) private booleanprotected voidprivate <T> voidinitializeGameRuleValue(GameRule<T> rule, String valueStr) voidonClose()protected voidonDone()voidonGamemasterPermissionChanged(boolean hasGamemasterPermission) voidonGameRuleValuesUpdated(Map<ResourceKey<GameRule<?>>, String> values) Methods inherited from class AbstractGameRulesScreen
clearInvalid, closeAndApplyChanges, closeAndDiscardChanges, createAndConfigureSearchBox, filterGameRules, init, markInvalid, repositionElements, setInitialFocusMethods inherited from class Screen
added, addRenderableOnly, addRenderableWidget, addWidget, afterKeyboardAction, afterMouseAction, afterMouseMove, canInterruptWithAnotherScreen, changeFocus, children, clearFocus, clearWidgets, clickCommandAction, clickUrlAction, defaultHandleClickEvent, defaultHandleGameClickEvent, fadeWidgets, fillCrashDetails, findNarratableWidget, getBackgroundMusic, getFont, getMinecraft, getNarrationMessage, getRectangle, getTitle, getTooltipFromItem, getUsageNarration, handleDelayedNarration, init, insertText, isAllowedInPortal, isInGameUi, isMouseOver, isPauseScreen, isValidCharacterForName, keyPressed, onFilesDrop, panoramaShouldSpin, rebuildWidgets, removed, removeWidget, render, renderBackground, renderBlurredBackground, renderMenuBackground, renderMenuBackground, renderMenuBackgroundTexture, renderPanorama, renderTransparentBackground, renderWithTooltipAndSubtitles, resize, setInitialFocus, shouldCloseOnEsc, shouldNarrateNavigation, showsActiveEffects, tick, triggerImmediateNarration, updateNarratedWidget, updateNarrationState, updateNarratorStatusMethods inherited from class AbstractContainerEventHandler
getFocused, isDragging, setDragging, setFocusedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContainerEventHandler
charTyped, getBorderForArrowNavigation, getChildAt, getCurrentFocusPath, isFocused, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, nextFocusPath, setFocusedMethods inherited from interface GuiEventListener
mouseMoved, shouldTakeFocusAfterInteractionMethods inherited from interface TabOrderedElement
getTabOrderGroup
-
Field Details
-
PENDING_TEXT
-
initialValues
-
serverProvidedRules
-
connection
-
lastScreen
-
loadingDotsWidget
-
receivedServerValues
private boolean receivedServerValues
-
-
Constructor Details
-
InWorldGameRulesScreen
public InWorldGameRulesScreen(ClientPacketListener connection, Consumer<Optional<GameRules>> exitCallback, Screen lastScreen)
-
-
Method Details
-
initContent
protected void initContent()- Specified by:
initContentin classAbstractGameRulesScreen
-
onDone
protected void onDone()- Specified by:
onDonein classAbstractGameRulesScreen
-
collectChangedGameRuleWithCast
private <T> void collectChangedGameRuleWithCast(GameRule<T> rule, Object initialValue, List<ServerboundSetGameRulePacket.Entry> entries) -
collectChangedGameRule
private <T> void collectChangedGameRule(GameRule<T> rule, T initialValue, List<ServerboundSetGameRulePacket.Entry> entries) -
onClose
-
hasPendingChanges
private boolean hasPendingChanges() -
hasGameRuleChanged
-
onGameRuleValuesUpdated
-
initializeGameRuleValue
-
onGamemasterPermissionChanged
public void onGamemasterPermissionChanged(boolean hasGamemasterPermission) - Specified by:
onGamemasterPermissionChangedin interfaceHasGamemasterPermissionReaction
-