Minecraft
Minecraft stuffs, mostly command blocks
Show Feedback
- /gamerule sendCommandFeedback true
- /gamerule commandBlockOutput true
Building an automatic Iron Golem spawner
Obviously, you can change this to something else
This is in 1.21.10 Java Edition
-
Perform the following commands
/scoreboard objectives add WorldTime dummy/scoreboard objectives add IsNight dummy
-
Create a Repeat, Unconditional, Always Active Command Block with the following:
/execute store result score #WorldTime WorldTime run time query daytime
-
Create a Chain, Conditional, Always Active Command Block with the following:
/execute if score #WorldTime WorldTime matches 13000 if score #Flag IsNight matches 0 run summon minecraft:iron_golem ~ -1 ~- NOTE: Replace ~ -1 ~ to the location you want the Iron Golem summoned
-
Create a Chain, Unconditional, Always Active Command Block with the following:
/execute if score #WorldTime WorldTime matches 12000 run scoreboard players set #Flag IsNight 0
-
Create a Chain, Unconditional, Always Active Command Block with the following:
/execute if score #WorldTime WorldTime matches 14000 run scoreboard players set #Flag IsNight 1
IMPORTANT: You need to put each block connected to teach other, facing the same direction.