Uses of Class
net.minecraft.world.level.gamerules.GameRule
Packages that use GameRule
Package
Description
-
Uses of GameRule in net.minecraft.client.gui.screens.options
Fields in net.minecraft.client.gui.screens.options with type parameters of type GameRuleModifier and TypeFieldDescriptionInWorldGameRulesScreen.initialValuesInWorldGameRulesScreen.serverProvidedRulesMethods in net.minecraft.client.gui.screens.options with parameters of type GameRuleModifier and TypeMethodDescriptionprivate <T> voidInWorldGameRulesScreen.collectChangedGameRule(GameRule<T> rule, T initialValue, List<ServerboundSetGameRulePacket.Entry> entries) private <T> voidInWorldGameRulesScreen.collectChangedGameRuleWithCast(GameRule<T> rule, Object initialValue, List<ServerboundSetGameRulePacket.Entry> entries) private <T> booleanInWorldGameRulesScreen.hasGameRuleChanged(GameRule<T> rule, Object initialValue) private <T> voidInWorldGameRulesScreen.initializeGameRuleValue(GameRule<T> rule, String valueStr) Method parameters in net.minecraft.client.gui.screens.options with type arguments of type GameRuleModifier and TypeMethodDescriptionvoidInWorldGameRulesScreen.onGameRuleValuesUpdated(Map<ResourceKey<GameRule<?>>, String> values) -
Uses of GameRule in net.minecraft.client.gui.screens.worldselection
Methods in net.minecraft.client.gui.screens.worldselection with parameters of type GameRuleModifier and TypeMethodDescriptionAbstractGameRulesScreen.EntryFactory.create(Component name, List<FormattedCharSequence> tooltip, String narration, GameRule<T> gameRule) Constructors in net.minecraft.client.gui.screens.worldselection with parameters of type GameRuleModifierConstructorDescriptionBooleanRuleEntry(Component name, List<FormattedCharSequence> tooltip, String narration, GameRule<Boolean> gameRule) IntegerRuleEntry(Component label, List<FormattedCharSequence> tooltip, String narration, GameRule<Integer> gameRule) -
Uses of GameRule in net.minecraft.core.registries
Fields in net.minecraft.core.registries with type parameters of type GameRule -
Uses of GameRule in net.minecraft.gametest.framework
Methods in net.minecraft.gametest.framework with parameters of type GameRuleModifier and TypeMethodDescriptionprivate static <T> voidTestEnvironmentDefinition.SetGameRules.setFromActive(GameRuleMap map, GameRule<T> rule, GameRules rules) -
Uses of GameRule in net.minecraft.network.protocol.game
Fields in net.minecraft.network.protocol.game with type parameters of type GameRuleModifier and TypeFieldDescriptionprivate final ResourceKey<GameRule<?>> ServerboundSetGameRulePacket.Entry.gameRuleKeyThe field for thegameRuleKeyrecord component.private final Map<ResourceKey<GameRule<?>>, String> ClientboundGameRuleValuesPacket.valuesThe field for thevaluesrecord component.Methods in net.minecraft.network.protocol.game that return types with arguments of type GameRuleModifier and TypeMethodDescriptionResourceKey<GameRule<?>> ServerboundSetGameRulePacket.Entry.gameRuleKey()Returns the value of thegameRuleKeyrecord component.Map<ResourceKey<GameRule<?>>, String> ClientboundGameRuleValuesPacket.values()Returns the value of thevaluesrecord component.Constructor parameters in net.minecraft.network.protocol.game with type arguments of type GameRuleModifierConstructorDescriptionClientboundGameRuleValuesPacket(Map<ResourceKey<GameRule<?>>, String> values) Creates an instance of aClientboundGameRuleValuesPacketrecord class.Entry(ResourceKey<GameRule<?>> gameRuleKey, String value) Creates an instance of aEntryrecord class. -
Uses of GameRule in net.minecraft.server
Methods in net.minecraft.server with parameters of type GameRuleModifier and TypeMethodDescription<T> voidMinecraftServer.onGameRuleChanged(GameRule<T> rule, T value) -
Uses of GameRule in net.minecraft.server.commands
Methods in net.minecraft.server.commands with parameters of type GameRuleModifier and TypeMethodDescriptionprivate static <T> com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> GameRuleCommand.buildRuleArguments(GameRule<T> gameRule, com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> ruleLiteral) private static <T> intGameRuleCommand.queryRule(CommandSourceStack source, GameRule<T> gameRule) private static <T> intGameRuleCommand.setRule(com.mojang.brigadier.context.CommandContext<CommandSourceStack> context, GameRule<T> gameRule) -
Uses of GameRule in net.minecraft.server.jsonrpc
Methods in net.minecraft.server.jsonrpc with parameters of type GameRuleModifier and TypeMethodDescription<T> voidJsonRpcNotificationService.onGameRuleChanged(GameRule<T> gameRule, T value) -
Uses of GameRule in net.minecraft.server.jsonrpc.internalapi
Methods in net.minecraft.server.jsonrpc.internalapi that return types with arguments of type GameRuleModifier and TypeMethodDescriptionMinecraftGameRuleService.getAvailableGameRules()MinecraftGameRuleServiceImpl.getAvailableGameRules()Methods in net.minecraft.server.jsonrpc.internalapi with parameters of type GameRuleModifier and TypeMethodDescription<T> TMinecraftGameRuleService.getRuleValue(GameRule<T> gameRule) <T> TMinecraftGameRuleServiceImpl.getRuleValue(GameRule<T> gameRule) MinecraftGameRuleService.getTypedRule(GameRule<T> gameRule, T value) MinecraftGameRuleServiceImpl.getTypedRule(GameRule<T> gameRule, T value) -
Uses of GameRule in net.minecraft.server.jsonrpc.methods
Fields in net.minecraft.server.jsonrpc.methods declared as GameRuleModifier and TypeFieldDescriptionGameRulesService.GameRuleUpdate.gameRuleThe field for thegameRulerecord component.Methods in net.minecraft.server.jsonrpc.methods that return GameRuleModifier and TypeMethodDescriptionGameRulesService.GameRuleUpdate.gameRule()Returns the value of thegameRulerecord component.Methods in net.minecraft.server.jsonrpc.methods with parameters of type GameRuleModifier and TypeMethodDescriptionprivate static <T> voidGameRulesService.addGameRule(MinecraftApi minecraftApi, GameRule<T> gameRule, List<GameRulesService.GameRuleUpdate<?>> rules) static <T> GameRulesService.GameRuleUpdate<T> GameRulesService.getTypedRule(MinecraftApi minecraftApi, GameRule<T> gameRule, T value) private static <T> GameRulesService.GameRuleUpdate<T> GameRulesService.GameRuleUpdate.getUntypedRule(GameRule<T> gameRule, GameRuleType readType, T value) private static <T> com.mojang.serialization.MapCodec<? extends GameRulesService.GameRuleUpdate<T>> GameRulesService.GameRuleUpdate.getValueAndTypeCodec(GameRule<T> gameRule) private static <T> com.mojang.serialization.MapCodec<? extends GameRulesService.GameRuleUpdate<T>> GameRulesService.GameRuleUpdate.getValueCodec(GameRule<T> gameRule) Constructors in net.minecraft.server.jsonrpc.methods with parameters of type GameRuleModifierConstructorDescriptionGameRuleUpdate(GameRule<T> gameRule, T value) Creates an instance of aGameRuleUpdaterecord class. -
Uses of GameRule in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type GameRuleModifier and TypeMethodDescriptionprivate Explosion.BlockInteractionServerLevel.getDestroyType(GameRule<Boolean> gameRule) -
Uses of GameRule in net.minecraft.server.network
Methods in net.minecraft.server.network with parameters of type GameRuleModifier and TypeMethodDescriptionprivate static <T> voidServerGamePacketListenerImpl.addGameRuleValue(GameRules gameRules, Map<ResourceKey<GameRule<?>>, String> values, GameRule<T> rule) private <T> voidServerGamePacketListenerImpl.broadcastGameRuleChangeToOperators(GameRule<T> rule, T value) private <T> voidServerGamePacketListenerImpl.setGameRuleValue(GameRules gameRules, GameRule<T> rule, String value) Method parameters in net.minecraft.server.network with type arguments of type GameRuleModifier and TypeMethodDescriptionprivate static <T> voidServerGamePacketListenerImpl.addGameRuleValue(GameRules gameRules, Map<ResourceKey<GameRule<?>>, String> values, GameRule<T> rule) -
Uses of GameRule in net.minecraft.server.notifications
Methods in net.minecraft.server.notifications with parameters of type GameRuleModifier and TypeMethodDescription<T> voidEmptyNotificationService.onGameRuleChanged(GameRule<T> gameRule, T value) <T> voidNotificationManager.onGameRuleChanged(GameRule<T> gameRule, T value) <T> voidNotificationService.onGameRuleChanged(GameRule<T> gameRule, T value) -
Uses of GameRule in net.minecraft.world.level.gamerules
Fields in net.minecraft.world.level.gamerules declared as GameRuleModifier and TypeFieldDescriptionGameRules.ADVANCE_TIMEGameRules.ADVANCE_WEATHERGameRules.ALLOW_ENTERING_NETHER_USING_PORTALSGameRules.BLOCK_DROPSGameRules.BLOCK_EXPLOSION_DROP_DECAYGameRules.COMMAND_BLOCK_OUTPUTGameRules.COMMAND_BLOCKS_WORKGameRules.DROWNING_DAMAGEGameRules.ELYTRA_MOVEMENT_CHECKGameRules.ENDER_PEARLS_VANISH_ON_DEATHGameRules.ENTITY_DROPSGameRules.FALL_DAMAGEGameRules.FIRE_DAMAGEGameRules.FIRE_SPREAD_RADIUS_AROUND_PLAYERGameRules.FORGIVE_DEAD_PLAYERSGameRules.FREEZE_DAMAGEGameRules.GLOBAL_SOUND_EVENTSGameRules.IMMEDIATE_RESPAWNGameRules.KEEP_INVENTORYGameRules.LAVA_SOURCE_CONVERSIONGameRules.LIMITED_CRAFTINGGameRules.LOCATOR_BARGameRules.LOG_ADMIN_COMMANDSGameRules.MAX_BLOCK_MODIFICATIONSGameRules.MAX_COMMAND_FORKSGameRules.MAX_COMMAND_SEQUENCE_LENGTHGameRules.MAX_ENTITY_CRAMMINGGameRules.MAX_MINECART_SPEEDGameRules.MAX_SNOW_ACCUMULATION_HEIGHTGameRules.MOB_DROPSGameRules.MOB_EXPLOSION_DROP_DECAYGameRules.MOB_GRIEFINGGameRules.NATURAL_HEALTH_REGENERATIONGameRules.PLAYER_MOVEMENT_CHECKGameRules.PLAYERS_NETHER_PORTAL_CREATIVE_DELAYGameRules.PLAYERS_NETHER_PORTAL_DEFAULT_DELAYGameRules.PLAYERS_SLEEPING_PERCENTAGEGameRules.PROJECTILES_CAN_BREAK_BLOCKSGameRules.PVPGameRules.RAIDSGameRules.RANDOM_TICK_SPEEDGameRules.REDUCED_DEBUG_INFOGameRules.RESPAWN_RADIUSGameRules.SEND_COMMAND_FEEDBACKGameRules.SHOW_ADVANCEMENT_MESSAGESGameRules.SHOW_DEATH_MESSAGESGameRules.SPAWN_MOBSGameRules.SPAWN_MONSTERSGameRules.SPAWN_PATROLSGameRules.SPAWN_PHANTOMSGameRules.SPAWN_WANDERING_TRADERSGameRules.SPAWN_WARDENSGameRules.SPAWNER_BLOCKS_WORKGameRules.SPECTATORS_GENERATE_CHUNKSGameRules.SPREAD_VINESGameRules.TNT_EXPLODESGameRules.TNT_EXPLOSION_DROP_DECAYGameRules.UNIVERSAL_ANGERGameRules.WATER_SOURCE_CONVERSIONFields in net.minecraft.world.level.gamerules with type parameters of type GameRuleMethods in net.minecraft.world.level.gamerules that return GameRuleModifier and TypeMethodDescriptionstatic GameRule<?> static <T> GameRule<T> GameRules.register(String id, GameRuleCategory category, GameRuleType typeHint, com.mojang.brigadier.arguments.ArgumentType<T> argumentType, com.mojang.serialization.Codec<T> codec, T defaultValue, FeatureFlagSet requiredFeatures, GameRules.VisitorCaller<T> visitorCaller, ToIntFunction<T> commandResultFunction) GameRules.registerBoolean(String id, GameRuleCategory category, boolean defaultValue) GameRules.registerInteger(String id, GameRuleCategory category, int defaultValue, int min) GameRules.registerInteger(String id, GameRuleCategory category, int defaultValue, int min, int max) GameRules.registerInteger(String id, GameRuleCategory category, int defaultValue, int min, int max, FeatureFlagSet requiredFeatures) Methods in net.minecraft.world.level.gamerules that return types with arguments of type GameRuleModifier and TypeMethodDescriptionGameRules.availableRules()GameRuleMap.keySet()GameRuleMap.map()Methods in net.minecraft.world.level.gamerules with parameters of type GameRuleModifier and TypeMethodDescriptionvoidGameRules.VisitorCaller.call(GameRuleTypeVisitor visitor, GameRule<T> key) <T> @Nullable T<T> T<T> StringGameRules.getAsString(GameRule<T> gameRule) boolean<T> @Nullable T<T> void<T> void<T> voidGameRules.set(GameRule<T> gameRule, T value, @Nullable MinecraftServer server) private <T> voidGameRules.setFromOther(GameRuleMap gameRulesMap, GameRule<T> gameRule, @Nullable MinecraftServer server) private static <T> voidGameRuleMap.setGameRule(GameRuleMap other, GameRule<T> gameRule, GameRuleMap result) default <T> voiddefault voidGameRuleTypeVisitor.visitBoolean(GameRule<Boolean> gameRule) default voidGameRuleTypeVisitor.visitInteger(GameRule<Integer> gameRule) Method parameters in net.minecraft.world.level.gamerules with type arguments of type GameRuleModifier and TypeMethodDescriptionstatic GameRule<?> static GameRuleMapprivate static GameRuleMapvoidGameRuleMap.setFromIf(GameRuleMap other, Predicate<GameRule<?>> predicate) Constructor parameters in net.minecraft.world.level.gamerules with type arguments of type GameRule -
Uses of GameRule in net.neoforged.neoforge.client.gamerules
Methods in net.neoforged.neoforge.client.gamerules with parameters of type GameRuleModifier and TypeMethodDescriptionstatic <T> voidGameRuleEntryFactoryManager.appendGameRuleEntry(AbstractGameRulesScreen screen, GameRule<T> gameRule, BiConsumer<GameRule<T>, AbstractGameRulesScreen.EntryFactory<T>> addEntry) GameRuleEntryFactory.create(AbstractGameRulesScreen screen, Component description, List<FormattedCharSequence> tooltip, String str, GameRule<T> gameRule) Method parameters in net.neoforged.neoforge.client.gamerules with type arguments of type GameRuleModifier and TypeMethodDescriptionstatic <T> voidGameRuleEntryFactoryManager.appendGameRuleEntry(AbstractGameRulesScreen screen, GameRule<T> gameRule, BiConsumer<GameRule<T>, AbstractGameRulesScreen.EntryFactory<T>> addEntry) Constructors in net.neoforged.neoforge.client.gamerules with parameters of type GameRuleModifierConstructorDescriptionGenericGameRuleEntry(AbstractGameRulesScreen screen, Component label, List<FormattedCharSequence> tooltip, String narration, GameRule<T> gameRule) -
Uses of GameRule in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type GameRuleModifier and TypeMethodDescriptionstatic <T> voidEventHooks.onGameRuleChanged(MinecraftServer server, GameRule<T> gameRule, T newValue) -
Uses of GameRule in net.neoforged.neoforge.event.level
Fields in net.neoforged.neoforge.event.level declared as GameRuleMethods in net.neoforged.neoforge.event.level that return GameRuleMethods in net.neoforged.neoforge.event.level with parameters of type GameRuleModifier and TypeMethodDescription<T> voidGameRuleChangedEvent.runIfMatching(GameRule<T> gameRule, Consumer<T> action) Constructors in net.neoforged.neoforge.event.level with parameters of type GameRuleModifierConstructorDescription<T>GameRuleChangedEvent(MinecraftServer server, GameRule<T> gameRule, T newValue)