[Гайд] Команда /gamerule, все её подкоманды
Текст в ‘ ‘ нужно писать обязательно. Вместо него нужно поместить игровое правило без скобок, список игровых правил описан ниже.
‘[true|false]‘, вместо него нужно поместить true или false. true — это правда, false — ложь. Писать так же нужно без скобок.
На момент релиза 1.9.4 существует 18 игровых правил.
commandBlockOutput — Предупреждать ли админов о выполнении команд в командном блоке (по умолчанию true)
disableElytraMovementCheck — Должен ли сервер пропускать проверку скорости игроков с надетыми надкрыльями (не рекомендуется изменять) (работает только на серверах) (по умолчанию false)
doDaylightCycle — Должен ли цикл дня/ночи изменять свой процесс (время также не изменяется во время сна в кровати) (по умолчанию true)
doEntityDrops — Должны ли существа, не являющиеся мобами дропать предметы (такие как падающий песок) (по умолчанию true)
doFireTick — Должен ли огонь тушится ветром или переходить на другие горючие блоки (по умолчанию true)
doMobLoot — Должны ли мобы дропать предметы (по умолчанию true)
dpMobSpawning — Должны ли мобы естественно спаунится (по умолчанию true)
doTileDrops — Дроп предметов после разрушения блоков (по умолчанию true)
keepInventory — Должен ли инвентарь сохранятся после смерти игрока (по умолчанию false)
logAdminCommands — Запись команд администратора в лог сервера (работает только в мультиплеере) (по умолчанию true)
mobGriefing — Должны ли криперы, зомби, эндермены, гасты, иссушители, эндер драконы, овцы, кролики и деревенские жители иметь право изменять блоки и должны ли деревенские жители, зомби, скелеты и зомби-свинолюди поднимать выпавшие предметы (по умолчанию true)
naturalRegeneration — Должен ли игрок естественно регенерировать своё здоровье, если его сытость почти полна (нет эффекта на дополнительную регенерацию, такие как золотые яблоки, эффект регенерации и т. п.) (по умолчанию true)
randomTickSpeed — Как часто должен происходить случайный игровой тик (такие как рост растений, опадение листвы и т. п.) на каждый игровой чанк каждый игровой тик. Значение 0 отключает случайные тики, большие значения увеличивают время между случайными тиками (по умолчанию 3)
reducedDebugInfo — неизвестно, но лучше не включать (по умолчанию false)
sendCommandFeedback — Выводить ли в чат информацию при успешном выполнении команды в чате (по умолчанию true)
showDeathMessages — Должно ли после смерти появляться соответствующее сообщение (по умолчанию true
spectatorsGenerateChunks — Должны ли игроки в режиме наблюдения (/gamemode 3) генерировать новые чанки (по умолчанию true)
Если введено только правило, в чате отобразится его установленное на данный момент значение.
Источник статьи: http://ru-minecraft.ru/instrukcii-gajdy-minecraft/46109-gayd-komanda-gamerule-vse-ee-podkomandy.html
Commands/gamerule
Sets or queries a game rule value.
Contents
Syntax [ edit ]
- Java Edition
gamerule [ ]
- Bedrock Edition
gamerule [value: Boolean] gamerule [value: int] In Bedrock Edition, gamerules can also be changed in the world options and certain gamerules can be toggled on and off with the command without cheats enabled. This only works in singleplayer, server gamerules and server settings cannot be adjusted using the client settings, even if a player is opped.
Arguments [ edit ]
Arguments in Java Edition are case sensitive. Arguments in Bedrock Edition are shown for tab autocompletion as lowercase, but when typed are case-insensitive.
(BE: rule: BoolGameRule or rule: IntGameRule )
Specifies the game rule to set or query. Must be one of predefined game rules in the table below.
(BE: value: Boolean or value: int ) (optional)
Specifies the value to set the game rule to. Only true or false specified for predefined game rules can affect gameplay, except in the case of maxEntityCramming , randomTickSpeed , spawnRadius , and maxCommandChainLength where any integer 0 or greater affects gameplay (see the table below). [ needs testing ]
Rule name | Description | Default value | Type | Availability | |
---|---|---|---|---|---|
Java | Bedrock | ||||
announceAdvancements | Whether advancements should be announced in chat | true | Bool | Yes | No |
commandBlocksEnabled | Whether command blocks should be enabled in-game | true | Bool | No | Yes |
commandBlockOutput | Whether command blocks should notify admins when they perform commands | true | Bool | Yes | Yes |
disableElytraMovementCheck | Whether the server should skip checking player speed when the player is wearing elytra. Often helps with jittering due to lag in multiplayer. | false | Bool | Yes | No |
disableRaids | Whether raids are disabled. | false | Bool | Yes | No |
doDaylightCycle | Whether the daylight cycle and moon phases progress | true | Bool | Yes | Yes |
doEntityDrops | Whether entities that are not mobs should have drops | true | Bool | Yes | Yes |
doFireTick | Whether fire should spread and naturally extinguish | true | Bool | Yes | Yes |
doInsomnia | Whether phantoms can spawn in the nighttime | true | Bool | Yes | Yes |
doImmediateRespawn | Players respawn immediately without showing the death screen | false | Bool | Yes | Yes |
doLimitedCrafting | Whether players should be able to craft only those recipes that they’ve unlocked first | false | Bool | Yes | No |
doMobLoot | Whether mobs should drop items | true | Bool | Yes | Yes |
doMobSpawning | Whether mobs should naturally spawn. Does not affect monster spawners. | true | Bool | Yes | Yes |
doPatrolSpawning | Whether patrols can spawn | true | Bool | Yes | No |
doTileDrops | Whether blocks should have drops | true | Bool | Yes | Yes |
doTraderSpawning | Whether wandering traders can spawn | true | Bool | Yes | No |
doWeatherCycle | Whether the weather can change naturally. The /weather command can still change weather. | true | Bool | Yes | Yes |
drowningDamage | Whether the player should take damage when drowning | true | Bool | Yes | Yes |
fallDamage | Whether the player should take fall damage | true | Bool | Yes | Yes |
fireDamage | Whether the player should take fire damage | true | Bool | Yes | Yes |
forgiveDeadPlayers | Makes angered neutral mobs stop being angry when the targeted player dies nearby | true | Bool | Yes | No |
keepInventory | Whether the player should keep items and experience in their inventory after death | false | Bool | Yes | Yes |
logAdminCommands | Whether to log admin commands to server log | true | Bool | Yes | No |
maxCommandChainLength | Determines the number at which the chain command block acts as a «chain». | 65536 | Int | Yes | Yes |
maxEntityCramming | The maximum number of other pushable entities a mob or player can push, before taking 3 suffocation damage per half-second. Setting to 0 or lower disables the rule. Damage affects survival-mode or adventure-mode players, and all mobs but bats. Pushable entities include non-spectator-mode players, any mob except bats, as well as boats and minecarts. | 24 | Int | Yes | No |
mobGriefing | Whether creepers, zombies, endermen, ghasts, withers, ender dragons, rabbits, sheep, villagers, silverfish, snow golems, and end crystals should be able to change blocks and whether mobs can pick up items, which also disables bartering. This also affects the capability of zombie-like creatures like zombie pigmen and drowned to pathfind to turtle eggs. | true | Bool | Yes | Yes |
naturalRegeneration | Whether the player can regenerate health naturally if their hunger is full enough (doesn’t affect external healing, such as golden apples, the Regeneration effect, etc.) | true | Bool | Yes | Yes |
pvp | Whether the player can fight with other players | true | Bool | No | Yes |
randomTickSpeed | How often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 disables random ticks [ needs testing ] , higher numbers increase random ticks. Setting to a high integer results in high speeds of decay and growth | 3 [ JE only ] 1 [ BE only ] | Int | Yes | Yes |
reducedDebugInfo | Whether the debug screen shows all or reduced information; and whether the effects of F3 + B (entity hitboxes) and F3 + G (chunk boundaries) are shown. | false | Bool | Yes | No |
sendCommandFeedback | Whether the feedback from commands executed by a player should show up in chat. Also affects the default behavior of whether command blocks store their output text | true | Bool | Yes | Yes |
showCoordinates | Whether the player’s coordinates are displayed | true | Bool | No | Yes |
showDeathMessages | Whether death messages are put into chat when a player dies. Also affects whether a message is sent to the pet’s owner when the pet dies. | true | Bool | Yes | Yes |
spawnRadius | The number of blocks outward from the world spawn coordinates that a player spawns in when first joining a server or when dying without a personal spawnpoint. | 10 [ JE only ] 5 [ BE only ] | Int | Yes | Yes |
spectatorsGenerateChunks | Whether players in spectator mode can generate chunks | true | Bool | Yes | No |
tntExplodes | Whether TNT explodes after activation | true | Bool | No | Yes |
universalAnger | Makes angered neutral mobs attack any nearby player, not just the player that angered them. Works best if forgiveDeadPlayers is disabled. | false | Bool | Yes | No |
showTags | Hides the «Can place on» and «Can destroy» block lists from item lore. | true | Bool | No | Yes |
Additional behavior [ edit ]
This section explains more complex behaviors of certain gamerules.
- disableRaids
- When true, the Bad Omen effect is not removed from a player when entering a village.
- Stops a raid if set to true while a raid is in progress, but the existing raid mobs do not despawn.
- doEntityDrops
- When false, items cannot be removed from item frames.
- doMobSpawning
- Affects only natural mob spawning. Mobs from structures, spawners, and events still spawn when set to false.
- doTileDrops
- When false, containers still drop their contents, but not themselves.
- Shulker boxes do not drop anything, causing the items in them to be lost.
- When false, destroying an armor stand does not drop it nor any armor it had equipped.
- When false, item frames still drop themselves and their items.
- When false, containers still drop their contents, but not themselves.
- drowningDamage
- When false, the player still loses air, but does not take damage when the air is depleted.
- fireDamage
- When false, the player may still be set on fire, but does not take damage when on fire.
- keepInventory
- When true, players also retain their experience upon death.
- When true, health and hunger are still reset as normal upon death.
- mobGriefing
- When false, prevents:
- All mobs from:
- Trampling crops.
- Trampling turtle eggs.
- Picking up items.
- Blazes from creating fire or lighting campfires.
- Creepers from destroying blocks when they explode, although they still damage entities.
- End crystals from destroying blocks when they explode, although they still damage entities.
- The ender dragon from destroying blocks, causing it to just fly through them instead.
- Endermen from picking up or placing blocks.
- Evoker from turning blue sheep red.
- Foxes from picking sweet berries from a sweet berry bush.
- Ghast fireballs from exploding blocks and creating fire. They still damage entities.
- Piglins from attempting to barter.
- Rabbits from eating carrot crops.
- Ravagers from destroying crops and leaves.
- Sheep from turning grass blocks into dirt, but does not prevent the regrowth of wool. They still act as if they are eating the grass and regrow their wool upon doing so, but the grass remains and the grass breaking sound does not play.
- Silverfish from hiding in stone and destroying those blocks when hatching.
- Snow golems from creating snow trails.
- Villagers from farming and picking up items. However, they can still open doors and throw items.
- The wither and its heads from destroying blocks with their explosions. Entities are still damaged, and a wither rose drops as an item.
- Zombies from breaking doors and attacking turtle eggs.
- All mobs from:
- Has no effect on the player.
- When false, prevents:
- universalAnger
- Bees attack all nearby players when their beehive is broken, regardless of the setting of this gamerule. [1]
- Bees becoming angry when attacked works as expected.
- Bees attack all nearby players when their beehive is broken, regardless of the setting of this gamerule. [1]
Result [ edit ]
Fails if the arguments are not specified correctly.
On success, returns the value of the game rule (if is not provided) or sets the game rule to the specified value (if value is provided).
Examples [ edit ]
- To stop the day-night cycle: gamerule doDaylightCycle false
- To stop natural healing: gamerule naturalRegeneration false
- To stop creepers, ghasts and other mobs from modifying blocks: gamerule mobGriefing false
- To stop the natural cycle of weather: gamerule doWeatherCycle false
- For the player, so that they can keep all of their valuables when they die: gamerule keepInventory true
- To stop TNT from exploding: [ BE only ] gamerule tntExplodes false
Notes [ edit ]
In Bedrock Edition, there is another command for spawning raids, patrols, and wandering traders. See /mobevent .
Источник статьи: http://minecraft.gamepedia.com/Commands/gamerule