Environment

Time, weather and other game rules.


Weather

This command allows you to set the current weather type. Weather effects the entire world at the same time. Options are clear, rain(turns on snow in cold biome) or thunder (thunder snow in cold biome).

Syntax: /weather [weather type] [duration]

The duration is in seconds between 1 and 1000000. Duration defaults to 5 minutes if number is omitted. A repeating command block can be used to set the weather permanently. Use a long tick delay to avoid lag.

Note that special effects can happen during rain or lightning. Lightning can cause explosions or fire, although the fire is generally put out by the rain.

Lighting can also transform some creatures into charged variants:

  • Creepers become charged creepers, which deal more damage with a larger explosion radius.
  • Pigs become zombie pigmen.
  • Villagers become witches.
  • Mooshrooms change color from red to brown or from brown to red.

Lightning can also create a "Skeleton Trap Horse." The chances are 0.75–1.5 percent on easy, 1.5–4 percent on normal, and 2.8125–6.75 percent on hard. When a player gets near a horse, it transforms into four skeleton horsemen. The trap disappears after 15 minutes if it has not been activated.

Here are some examples:

/weather thunder 60

/weather clear


Time

Time of day can be set with the "/time add" or "/time set" commands. Some mobs will only appear at night and will be set on fire when the sun comes out.

Syntax: /time add [amount] or /time set [amount]

Time runs from 0 to 23999 (1 hour = 1000). Words can also be used for /time set. Day = 1000, noon = 6000, sunset =12000, night = 13000, midnight = 18000, sunrise = 23000.

Here are some examples:

/time set midnight

/time add 12000


Game rules

Game rules include many of the things found in the settings menu of Minecraft. Other options found hear can also be useful in customizing gameplay.

Syntax: /gamerule [rule name] [value]

Setting sendCommandFeedback and commandBlockOutput to false is important if you are doing repeating command blocks. Otherwise you will get spammed with notifications.

Here are some examples:

/gamerule pvp false

/gamerule falldamage false


A list of game rules:

Rule nameDescriptionDefault valueValue type
commandBlockOutputWhether command blocks should notify admins when they perform commandstrueBoolean
doDaylightCycleWhether the day-night cycle and moon phases progresstrueBoolean
doEntityDropsWhether entities that are not mobs should have dropstrueBoolean
doFireTickWhether fire should spread and naturally extinguishtrueBoolean
doInsomniaWhether phantoms can spawn in the nighttimetrueBoolean
immediateRespawnPlayers respawn immediately without showing the death screen falseBoolean
doMobLootWhether mobs should drop itemstrueBoolean
doMobSpawningWhether mobs should naturally spawn. Does not affect monster spawners.trueBoolean
doTileDropsWhether blocks should have dropstrueBoolean
doWeatherCycleWhether the weather can change naturally. The /weather command can still change weather.trueBoolean
drowningDamageWhether the player should take damage when drowningtrueBoolean
fallDamageWhether the player should take fall damagetrueBoolean
fireDamageWhether the player should take fire damagetrueBoolean
keepInventoryWhether the player should keep items and experience in their inventory after deathfalseBoolean
mobGriefingWhether creepers, zombies, endermen, ghasts, withers, ender dragons, rabbits, sheep, villagers, and snow golems should be able to change blocks and whether mobs can pick up items. This also affects the capability of zombie-like creatures like zombie pigmen and drowned to pathfind to turtle eggs. This will also prevent villagers from breeding.trueBoolean
naturalRegenerationWhether 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.)trueBoolean
pvpWhether the player can fight with other playerstrueBoolean
randomTickSpeedHow often a random block tick occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 disables random ticks, higher numbers increase random ticks. Setting to a high integer results in high speeds of decay and growth1‌Integer
sendCommandFeedbackWhether 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 texttrueBoolean
showCoordinatesWhether the player's coordinates are displayedtrueBoolean
showDeathMessagesWhether 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.trueBoolean
spawnRadiusThe 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.5‌Integer
tntExplodesWhether TNT explodes after activationtrueBoolean

Source: https://minecraft.gamepedia.com/



Previous lesson: Enchanting items   |   Next lesson: Cloning/filling


Copyright 2020, Peacemaker Media Empire.   |