emeraldfyr3Exponents, logarithms, roots, random numbers, and more! 1.12 brings with it the new /function command, which allows Minecraft command scripting without command blocks. To make use of this wonderful addition, I wrote a library of math functions for scoreboard values that you can import and run in any world.
**After you import the functions, be sure to run math:init to create the scoreboard objectives!**
Included Math Functions: divide_round: division that rounds the result to the nearest integer factorial: factorial of the given number log: logarithm of the given base for the given number power: the given number raised to the given power random: a random number in a specified range, up to 31 bits root: the nth root of the given number round: round the given number to the nearest multiple of another number
Math Function Library - Custom Commands in Minecraft 1.12emeraldfyr32017-05-14 | Exponents, logarithms, roots, random numbers, and more! 1.12 brings with it the new /function command, which allows Minecraft command scripting without command blocks. To make use of this wonderful addition, I wrote a library of math functions for scoreboard values that you can import and run in any world.
**After you import the functions, be sure to run math:init to create the scoreboard objectives!**
Included Math Functions: divide_round: division that rounds the result to the nearest integer factorial: factorial of the given number log: logarithm of the given base for the given number power: the given number raised to the given power random: a random number in a specified range, up to 31 bits root: the nth root of the given number round: round the given number to the nearest multiple of another numberDatapack Challenge Solution: Detect Minecraft 1.13.2 with Functionsemeraldfyr32021-01-09 | Congrats to the Datapack Challenge winner, Evtema3! Check out his channel here: youtube.com/channel/UC2R-J5Ik34sPqvUSBm2uUxQ The Minecraft Version Detector datapack is now able to detect all versions of Minecraft since 1.13.
How to Block YouTube Ads: github.com/emeraldfyr3/block-yt-ads/blob/master/README.mdDatapack Challenge: Detect Minecraft 1.13.2 with Functionsemeraldfyr32020-12-26 | Challenge for Minecraft command experts: Can you detect 1.13.2 with a datapack? Read below for more details!
GOAL: Create a function or datapack that sets a scoreboard value differently when loaded in 1.13.1 vs 1.13.2. For example, running a function in 1.13.1 will set the score of player "patch" in objective "mcversion" to 1 in 1.13.1, and 2 in 1.13.2.
GUIDELINES: The solution will most likely require observing some in-game behavior that changed between 1.13.1 and 1.13.2. This may require running certain commands, summoning entities, and/or placing blocks.
A perfect solution would only require commands, without using any entities or blocks. The next-best solution would use entities, but not require placing blocks. In addition, determining the version instantly is better than having some delay.
How to Block YouTube Ads: github.com/emeraldfyr3/block-yt-ads/blob/master/README.mdMinecraft Version Detector Datapack Minecraft Java 1.13-1.17emeraldfyr32020-12-23 | Get the running version of Minecraft as scoreboard values. This datapack finds the version by testing for Minecraft features and bug fixes that were added over time.
HOW TO USE: Put the datapack in your world's datapacks folder, and on world load the minecraft version will be stored in scoreboard values in the objective mcversion. The first number is "major", the second is "minor", and the third is "patch". For exampe, 1.16.4 would be major=1, minor=16, patch=4.
All release versions from 1.13 to 1.17 are detected except 1.13.2, 1.15.1, and 1.16.1.
How to Block YouTube Ads: github.com/emeraldfyr3/block-yt-ads/blob/master/README.mdMath Functions for Minecraft Java 1.16 - Power, Root, Log, & More!emeraldfyr32020-11-12 | Exponents, logarithms, roots, random numbers, and more! This library expands the math operations you can do with scoreboard values.
Included Math Functions: abs: get the absolute value of a number divide_round: division that rounds the result to the nearest integer factorial: factorial of the given number log: logarithm of the given base for the given number power: the given number raised to the given power random: a random number in a specified range, up to 31 bits root: the nth root of the given number round: round the given number to the nearest multiple of another number sign: get the sign of a number (-1 for negatives, 0 for 0, 1 for positives)
Pi puts the YouTube URL in the video: youtube.com/watch?v=D6L__oR1O9AMaze Solving Robot (Prototype) - Minecraft Java 1.16emeraldfyr32020-10-22 | Want to watch a flying machine navigate a maze?
Fully Automatic 4-Way Flying Machine: youtube.com/watch?v=joA6zdqtk-wFully Automatic 4-Way Flying Machine (Minecraft Java 1.16)emeraldfyr32020-09-19 | This flying machine can move AND turn in 4 directions without stopping! It combine's ilmango's 4-way flying machine and my self-returning tunnel bore.
IMPORTANT: After publishing this video, I found out that Burgled had made the same thing a year before: youtube.com/watch?v=Pi9Ui3MJTeY I didn't intend to copy his work. He deserves credit for doing this first after ilmango's original video came out.
Self-Returning Tunnel Bore: youtube.com/watch?v=UBoRQcyKuUkCommand+Q Fix for Mac: Drop Stacks of Itemsemeraldfyr32020-08-29 | Anyone else switch from Windows and accidentally quit the game trying to drop a stack of items? Here's how to make Cmd+Q drop a stack of items just like Ctrl+Q in Windows:
1. Open System Preferences 2. Go to Keyboard ⟩ Shortcuts ⟩ App Shortcuts 3. Click "+" to add a new shortcut 4. Put "Quit java" as the Menu Title (NOTE: If your game is modded, make sure that the text matches the option to quit the game from your computer's menu bar -- it might not be "Quit java".) 5. Click into the Keyboard Shortcut field and press Control and Q at the same time. Make sure to press Control, not Command. 6. Click Add to save the shortcut
This works by switching the shortcut to quit the game to Control+Q instead of Command+Q. This also switches it for any other Java executables named "java". Now, pressing Command+Q in Minecraft will drop a stack without quitting the game.3 Random Number Generator Functions for Minecraft Java 1.16emeraldfyr32020-07-18 | 3 custom-range RNG functions: fast pseudorandom numbers, "true" random numbers, and an RNG with a 100% uniform distribution.
HOW TO USE: 1. Set math_in1 on objective em to the lower bound of your range. 2. Set math_in2 on objective em to the upper bound of your range. Note that the highest possible output will be (upper - 1). 3. Run the random number function of your choice, and the output will be stored in math_out on objective em.
EarthComputer's Enchantment Seed Cracker: youtube.com/watch?v=hfiTZF0hlzwHow to Teleport to Scoreboard Values (Minecraft 1.16)emeraldfyr32020-06-21 | Teleport players and entities to coordinates in scoreboard objectives. Works with absolute and relative coordinates, and supports teleporting entities to unloaded chunks.
HOW TO USE: 1. Set an entity's score in these objectives: scoretp_x, scoretp_y, scoretp_z 2. Run the function as the entities you want to teleport: execute as SELECTOR at @s run function em:scoretp
RELATIVE VS ABSOLUTE COORDINATES: To use the values in scoreboard as relative coordinates, position the command at the entity: execute as SELECTOR at @s run function em:scoretp
To use the values in scoreboard as absolute coordinates, position the command at 0 0 0: execute as SELECTOR positioned 0 0 0 run function em:scoretp[Tutorial] Fully Automatic AFK Mining Machine (Minecraft Java 1.15 - 1.16)emeraldfyr32020-06-17 | Build tutorial for my 1.15 and 1.16 AFK Mining Machine. This machine will automatically mine out blocks and collect them. It can handle water, lava, gravel, and caves. It works in the Overworld and in the Nether. Best of all, it's small and easy to build in survival.
World Download: mediafire.com/file/ow5nn6yw5wxanie/AFK_Mining_Machine_1.16.zip/fileFully Automatic AFK Mining Machine (Minecraft Java 1.15 - 1.16)emeraldfyr32020-06-13 | Put that pickaxe away! The AFK mining machine is back and better than ever for 1.15 and 1.16. This machine will automatically mine out blocks and collect them. It can handle water, lava, gravel, and caves. It works in the Overworld and in the Nether. Best of all, it's small and easy to build in survival.
Math Library Download: http://www.mediafire.com/file/ofk14vd1brodar7/math.zip Extract the files to .minecraft/saves/[Your Minecraft World]/data/functions/math to use. Be sure to run /function math:init after downloading!
Raycast function: reddit.com/r/MinecraftCommands/comments/68swspFunction: Teleport to Scoreboard Values (Minecraft 1.12)emeraldfyr32017-05-28 | Teleport players and entities to coordinates in scoreboard objectives. Works with absolute and relative coordinates.
To use, set the scores of the entity in the objectives scoretp_x, scoretp_y, and scoretp_z. Then run the function "scoretp:" + the coordinates you want to teleport. For example, "scoretp:xz" will teleport in the x and z directions, and not y. Add a ~ before x, y, or z to use relative coordinates. For example, "scoretp:~xy~z" will teleport to relative x and z coordinates and absolute y coordinate.
Remember to run "/function scoretp:init" after downloading!
World Download: http://www.mediafire.com/file/133cj6vh375p89x/Functions_World.zip1.12 Custom-Range Random Number Functionemeraldfyr32017-05-16 | This function generates a random number in a range that you specify and puts it in a scoreboard objective, all without importing any command blocks into your world. The random number starts out as a 31-bit random number and is fitted into the specified range.
Math Functions Video: youtube.com/watch?v=Are2XbCGrnk0-Tick Loops with Chain Commands (Minecraft 17w16) No longer works! See description.emeraldfyr32017-04-22 | UPDATE: The next snapshot, 17w17a, added the UpdateLastExecution tag to command blocks. Now to enable loops, instead of cloning the blocks, just set that tag to 0 on all the blocks in the loop.
The changes to Chain Command Blocks in 17w16 enable modification of the chain while it's executing, allowing for conditional branches within the same tick. This means that we can do for- and while-loops without having to delay 1 tick for each iteration.
/u/Marcono1234's Reddit post explaining loops: reddit.com/r/Minecraft/comments/66ox6vFully Automatic AFK Mining Machine [Tutorial] (Minecraft 1.11+)emeraldfyr32017-03-12 | I made an unloading station for my Waterproof Tunnel Bore that automatically mines the blocks that the drill collects. With this machine, the player can sit AFK in a minecart while the drill mines out all those precious ores! The best part is that this design is fairly easy to build in survival mode, so it may actually be practical instead of just a proof of concept. It's perfect for players who want to mine while they sleep!
Materials Needed: (Thanks to Mr Soundso) 34 slime blocks 16 observers 23 Redstone dust 8 normal pistons 19 sticky pistons 4 melon blocks 1 Redstone block 2 trapdoors 4 detector rails 2 tnt 32 obsidian 3 minecarts 11 repeater 3 comparators 4 Redstone torches 1 Redstone lamp 1 cauldron 5 stone slabs 58 building blocks 1 hopper 1 chest 3 cobblestoneWaterproof 1-Wide Tunnel Bore (Minecraft 1.11+)emeraldfyr32017-01-15 | Water, lava, sand, gravel, and any cave you throw at it -- this tunnel bore can handle it all! On top of all that, it's only 1 block wide, 3 blocks tall, and 9 blocks long, making it very easy to build in survival mode.
Automatic unloading station without mining: Rubix One: youtube.com/watch?v=sK7BSJmASDkTunnel Bore Update (Minecraft 1.11)emeraldfyr32016-11-04 | The tunnel bore I designed last month that was broken by changes to observers is now working again, thanks to more changes to observers.
A fast and compact tunnel bore, only 1 block wide, 3 blocks high, and 6 blocks long. Tunnel bores are finally practical enough to build in survival! From my testing so far, it can handle caves and gravel/sand, but it cannot handle water or lava.
CubeHamster's Tunnel Bore: youtube.com/watch?v=ZHVMabW25yoSelf-Powered Redstone Lamps and BUD Redstone Dust (Minecraft 16w39c)emeraldfyr32016-10-01 | In 16w39c, observers can cause redstone dust, repeaters, torches, and other stuff to stay powered without a power source. One use for this is to make powered redstone lamps without having to hide levers. This is a bug that will most likely get fixed.[BROKEN] Smallest Piston Flying Machine Engine w/ Observeremeraldfyr32016-09-30 | The smallest (currently) possible piston engine: 3x1x2. The piston below the observer is sticky, and the other is regular.
I don't know if this has been shown yet, but a quick search on YouTube and the Minecraft forum came up dry. If anyone's seen this design before, please tell me where so I can give the creator credit!Infinite Furnace Fuel with Carpet Duplication - Minecraft 1.11.0-emeraldfyr32016-08-18 | UPDATE: No longer works as of 1.11.1.
Goodbye coal, hello carpets! 1.11 is bringing some new furnace fuel, and one of them can be automatically duplicated. This machine can produce a maximum of 2.5 carpets per second, limited by the hopper speed of 2.5 items per second. Since one carpet burns for 3.3 seconds, this machine can support up to 8 furnaces. ((2.5 carpets/second) * (3.3 furnace*seconds/carpet) = 8.25 furnaces)
Myren Eario's video: youtube.com/watch?v=qkSLYcPAhWIInstant Scoreboard Exponents in Minecraft 1.10emeraldfyr32016-07-13 | Here's how to instantly (in 0 ticks) calculate exponents from scoreboard values. This works with any base and any exponent, provided they don't overflow the scoreboard (32-bit signed integer).
Hey, who else is playing Pokemon Go? (literally everyone)Track Y Coordinate and Velocity for Any Number of Entities in Scoreboard (Minecraft 1.10)emeraldfyr32016-06-25 | This machine tracks the y positions and velocities of any number of entities simultaneously and stores the values in scoreboard objectives. Y position is accurate to the millimeter (1/1000th of a block), and y velocity is given in millimeters per second.
To import this structure into your world: Select your world in Minecraft's selection screen, click "Edit", and click "Open Folder". If you don't see a folder called "structures", create a new folder with that name. Copy "YTracker.nbt" into the "structures" folder. Finally, import it into your world with a structure block and turn it on. All scoreboard objectives are added automatically.Custom Range 31-Bit Random Number Generator in Minecraft 1.10+emeraldfyr32016-05-26 | This device can generate random numbers in any custom range of up to 31 bits all within a single game tick, and without using any entities!
Open the world folder in .minecraft/saves that you want to import this to and copy it into the folder called "structures". If the folder "structures" does not exist, create it. Then, load the structure in your world using the Load Structure block. The name of the structure is RandomNumberGenerator. Then, just set lower and upper bounds via the players Lower and Upper on the objective RNG, and take the output via the player Output also on RNG.
If you didn't come here from Tyruswoo's structure generator, then you should absolutely check it out! It's a great example of why good random number generators are important: youtube.com/watch?v=2UmPDfeqlDY
Tell me, what will you do with all these random numbers? Buy a boat? Invest in real estate? Donate them to charity? There are infinite* possibilities! *infinity = 2^31Custom Gravity in Minecraft 1.10 (16w20a)emeraldfyr32016-05-19 | Set your own gravity in vanilla Minecraft, anywhere from 0% to 100% of normal gravity!
This works by rapidly turning normal gravity on and off using the NoGravity tag. Unfortunately, this means that it's only possible to reduce gravity, not increase it, and that it doesn't work for players. However, player gravity can be affected by Levitation and Jump Boost, so I might be able to add custom player gravity in the future.
And sorry for the fan noise. My computer just wanted to say hello.Silent, Compact Dual Edge Detector (Minecraft 1.9)emeraldfyr32016-03-06 | Use levers as buttons! This is a dual edge detector, which means it pulses every time the state of the input redstone is changed. This design is only 3x2x1, and it uses some strange redstone behavior to make a 0-tick pulse whenever the input state is changed. To increase the pulse length and/or negate the output, you can hook up the output a dropper pointing into a hopper and take a comparator output from either.Sequentially Number Entities in 0 Ticks (Minecraft 1.8+)emeraldfyr32016-01-14 | Need a group of entities numbered 1, 2, 3, 4... ? Using this method, you can assign any number of entities sequential scoreboard values in zero ticks, meaning you can execute commands before and after numbering the entities all in the same tick.
Commands used: (Replace "CRITERIA" with the criteria of the entities you want to number.)
/scoreboard players set @e[CRITERIA] Number 0
/execute @e[CRITERIA] ~ ~ ~ stats entity @e[CRITERIA,r=0,c=1] set SuccessCount @e[CRITERIA,r=0,c=1] Number
Dr. Alphys' colored tile maze, from the game Undertale by Toby Fox, is a simple-looking puzzle with intentionally complicated rules. This map contains 25 custom-made puzzles, including both of the only two playable puzzles from Undertale. It also includes a level editor, so you can even design and share your own puzzles!
This map was made in Minecraft 1.8.9. The pre-made levels in this map can be played by up to 4 players, but custom-made levels from the level editor can include many more.
Music: "Bonetrousle" by Toby Fox http://undertale.wikia.com/wiki/Bonetrousle I don't know whether I'm allowed to use it in this video but then again the whole map is based on a minigame in Undertale so I may as well go all-in with the copyright infringement.
This automatic brewing machine can brew potions up to 3 times as fast as a regular brewing stand, WITHOUT queuing up pre-brewed potions! Unlike other automatic brewing systems, this machine can brew all types of potions. It uses a trick with brewing stands to start brewing before the potion is added.
Oh, and it's also silent. I like things to be silent.Silent 1-Wide Tileable Item Elevator in Minecraftemeraldfyr32015-08-26 | This item elevator makes no noise, can be tiled side-by-side, and can be expanded as high as you want. However, it can only take in 1 item per second. If an item is sent in less than 1 second after the previous item, the system will freeze.New 1.9 Item Pickup Stats: Currency System [15w33b]emeraldfyr32015-08-12 | Using the new pickup statistics, stat.pickup.minecraft.ITEM_NAME, you can automatically convert dropped items into scoreboard points with a custom value for each item. This is a very useful feature for mapmakers because previously the only way to do this was to run /clear on a clock, executing once for each item. Now it can all be done instantly, before the items even appear in the player's inventory.
Commands: In Chat: /scoreboard objectives add Money dummy /scoreboard players set @a Money 0
/scoreboard objectives add ITEMS_OBJ stat.pickup.minecraft.ITEM_NAME /scoreboard players set #Value ITEMS_OBJ VALUE
On a Clock (in order): execute @a ~ ~ ~ scoreboard players operation @p ITEMS_OBJ *= #Value ITEMS_OBJ execute @a ~ ~ ~ scoreboard players operation @p Money += @p ITEMS_OBJ scoreboard players set @a ITEMS_OBJ 0 clear @a minecraft:ITEM_NAMEMyth Re-Busting: What Mobs Climb Ladders?emeraldfyr32015-08-09 | This is a video response to Xisuma's video: youtube.com/watch?v=XpG40t1S1eA
I do more accurate tests to determine which mobs can climb ladders. It turns out that almost all mobs can, with these exceptions:
Music: "Reatch" by Argofox Creative Commons (youtube.com/watch?v=SfZbGxE4Ndk)How to Use Scoreboard Tags [15w32c]emeraldfyr32015-08-07 | Tutorial for the new scoreboard command in 1.9: "/scoreboard players tag" - what it does and how to use it
As of 15w32c, there are 3 commands for tags: add, remove, and list. When adding a tag, you must supply a name and may optionally supply a data tag to test for:
/scoreboard players tag @e add tag_name {CustomName:"Test"}
That will add the tag "tag_name" to all entities named Test. To remove a tag, you must specify the name and may optionally supply a data tag to test for:
/scoreboard players tag @e remove tag_name {CustomName:"Test"}
That will remove the tag "tag_name" from all entities named Test. "list" simply lists all tags on an entity:
/scoreboard players tag @e listHow to Automatically Track & Display Team Scores (Minecraft 1.8+)emeraldfyr32015-06-18 | How to track and display the total score of each team; that is, the sum of the scores of all the players on each team. Team scores will update automatically every time a player's score changes. This works for all objective criteria, such as dummy or playerKillCount.
At lower x coordinate: /fill ~ ~ ~1 ~1 ~ ~1 minecraft:stone At higher x coordinate: /fill ~ ~ ~1 ~-1 ~ ~1 minecraft:redstone_block
At lower x coordinate: /scoreboard players set TEAM TEAM_OBJECTIVE 0 At higher x coordinate: /execute @e[team=TEAM] ~ ~ ~ scoreboard players operation TEAM TEAM_OBJECTIVE += @e[r=0,c=1] OBJECTIVE
To show the objective in the sidebar: /scoreboard objectives setdisplay sidebar TEAM_OBJECTIVE
To add color to the team names, follow these instructions after following mine, using the same team names: youtube.com/watch?v=1-dCjCn-bXQEndermen Drop Carried Blocks - Single Command Creationemeraldfyr32015-04-23 | Make endermen drop the block they're holding when killed with a single command!
Just leave those minecart command blocks in loaded chunks, and all endermen everywhere will have this behavior. If you want to toggle this behavior, simply remove or re-add the scoreboard objective EndermanBlock.Improved Two-Way Bedrock Door [1.8.3]emeraldfyr32015-03-08 | Go up AND down through the ceiling of the Nether in 1.8.3. This design improved the concept I showed in my previous video so that it works anywhere in the Nether, so long as there is at least one bedrock at y=127 that has no extra bedrock below it.
A two-way door through the roof of the Nether, extra useful now that the bedrock-breaking bugs have been patched. It's basically a horse in a minecart on top of a triple-piston extender. A double- piston extender also works, but the player suffocates in the ceiling until they get off the horse, so I think the triple is better.
If anyone can think of any way to improve this design (such as a replacement for the horse that can't suffocate to death) please do let me know!How to Evenly Divide Item Streamsemeraldfyr32015-02-21 | Divide hopper streams evenly into two chests! -- A Teeny Tiny Tutorial by emeraldfyr3Create Custom Gamerules with QueryResultemeraldfyr32014-12-18 | Customize "/gamerule" with your own parameters!
*** IMPORTANT: As of 1.8.7 (and possibly earlier) it is no longer possible to test for "true" or "false". If a gamerule is set to true or false, the scoreboard simply will not update. Number still work though, so instead of typing "true" or "false", just type 1 or 0.
execute @e[score_OBJECTIVE_NAME=VALUE] ~ ~ ~ COMMANDCustom Range 31-Bit Random Number Generatoremeraldfyr32014-10-24 | Custom range random number generation in only 1 tick! This RNG can be imported into maps and used with only 3 commands.
Original Video: youtube.com/watch?v=9mh75UHN1tAHow to Light Up a Silverfish Spawneremeraldfyr32014-07-10 | Silverfish spawners can be very difficult to capture, but since there are only 3 in the world, they are considered too valueable to destroy. This method is a quick and easy way to light up the end portal room and disable the spawner without breaking it.Scoreboard Ranking Systememeraldfyr32014-07-01 | This system is for anyone who ever wanted to quickly and easily rank players in 1st, 2nd, 3rd, etc. for any scoreboard objective. Simply import the command blocks in this video and send them the scores!