Minecraft / Blogs

Exploiting the Subway Station Mechanisms in My World: Part Two

  • 3
  • 1
  • comment
  • playlist_add
  • share
  • more_horiz
avatar flashteens
Level 53 : Grandmaster Technomancer
127
Previous Post: Part One, the designs around the rail area of a subway station

[2016.07/18 UPDATE]
Have you ever wonder how to use this Vanilla-based technique in a Spigot server? Check it out at the end of this blog tutorial!

[2016.02/29 UPDATE]

On Feb. 24, 2016, the design described here once failed when tested in Minecraft 1.9-pre1 version. However, the same mechanism is successful in the test for Minecraft 1.9 RELEASE version!
To try this mechanism in Minecraft 1.9 version, please make sure you are playing in the 1.9 RELEASE version instead of any prior preview or snapshot versions of 1.9!




In this post, I'm going to talk about how to make a flexible subway guide map book dispenser system in Vanilla Minecraft 1.8.x versions. In fact, such a system can not only be used in subway stations, but also other applications such as game rules for a custom map or giving an item with a bulky content in the NBT tag, as long as there is a need for you to allow the players executing a specific command at multiple locations, especially in the case that such a command is really really long!

A Scenario

If you often play creative mode in 1.8+ versions of Minecraft, you may know a fact that holding the Ctrl key (in Windows) or Command key (in Mac) while you middle click on a block (e.g. chest, command block, banner) actually copies the whole attribute content from the original block. This feature in Minecraft 1.8+ allows us to copy a command in such a convenient way, whereas there might still be a problem if your project is pretty large.

Imagining that you have already been dedicating yourself to building a large city for months, and there could have been 10 or even more subway stations in your city. In order to make the visitors understand where they are or what to do, you might design a guide book for your city, copy the book everywhere in your city so as to be easily accessible through the chests or command blocks. The problem occurs once you desire to update the context of the books, since you may have to update hundreds of chests and command blocks over again, and you might miss somewhere and the old context would still remain!

My Solution

Such a problem can be solved by a technique of automation. In brief, my design consists of one central command block that executes the main command (e.g. to give a book), and many cloner command blocks that are accessible for the visitors to run such a command. The following image shows such a design, where the central command block is located at the position (X, Y, Z) = (1234, 56, 789):


Note that this is only one example for my design, which executes the command that directly give the book to a player. You can also change the central command to "/blockdata" so as to change the content in a trapped chest.

The Central Command Block

Please place this block in a well-protected zone, since it would include the entire command for generating the guide book for your world. To write such a guide book, you can make use of this website, which generates the command for giving the book. Then, copy the command from the website and paste it into the command block. By the way, don't forget to save the command as a text file in your computer for backup!

The Cloner Command Blocks

These blocks are accessible for the visitors by buttons, levers, pressure plates or tripwires, and can be placed throughout your city. Assumes that the central command block is located at (X, Y, Z), and the command of cloner blocks may look like:
/clone X Y Z X Y Z ~ ~-1 ~
What this command do is to automatically copy the central command block to the position right under this cloner block. At the same time, redstone signal is still on, and the cloned central command block may thus run the command that gives you the guide book!

How It Works & Some Issues

By observation, when you are triggering the cloner command block, your computer seems to automatically perform the following steps in sequence: (assuming that the cloner block is at the position of (x1, y1, z1).)
  1. Redstone signal is triggered.
  2. The cloner command block at (x1, y1, z1) is triggered. (not executed yet)
  3. If an old command block exists at (x1, y1-1, z1), under the cloner clock, then it is triggered. (not executed yet)
  4. The cloner block at (x1, y1, z1) is executed right away, and the old command block is immediately replaced with the new copy from the central command block, so the old command will not be executed.
  5. The new cloned central command block at (x1, y1-1, z1) is executed finally only if it is triggered. Note that there is an issue so far for this step (as tested in Minecraft 1.8.9): If the old command block did not exist when running the Step 3, strangely, the new cloned central command block would not receive the redstone signal. However, such a case may only happen at the first time you set up the cloner block. To solve such an issue, for the only first time you set up each cloner block, please trigger the redstone signal twice and the guide book will be successfully given to you!
WARNING: In Minecraft 1.9 snapshot or preview versions before release, Step 5 might be executed before Step 4, which causes this design to be no longer working. Yet, there isn't such a problem in the 1.9 release version.

The Use in My World Republic of FlashTeens

At the time I posted Part One, there were 37 subway stations, 22 of which contained my design for such a subway map guide book generator. After the Feb. 20, 2016 update, the number of subway stations has increased to 41+, and ALL of the stations now contain such a design. Since new routes were added, there was a need for the subway map to be updated. All I had to do is to update the book content at the location (167, 77, 216), where the central command block is. There was no need for me to place hundreds of the subway guide book generators over again!

UPDATE: Can I use this guide map book dispenser system for a multiplayer server?

By my tests in 1.10.2 version, this system works for Vanilla servers, whereas it does not work for a Spigot server without any plugins. The problem is caused because copying/placing any blocks out of the loaded chunks is not allowed in a Spigot server (without plugins). However, here is a solution to solve the problem for Spigot servers:
  1. Install the Chunk Loader plugin for the Spigot server.
  2. Go to the chunk that contains the Central Command Block (as described above), and then apply the command once to keep the chunk loaded: /chunkloader set



Click here for Part Three!
Tags

3 Update Logs

Update #3: A solution for you to use this technique in a Spigot server has come out! : 07/18/2016 3:51:37 amJul 18th, 2016

Have you ever wonder how to use this Vanilla-based technique in a Spigot server? Check it out at the end of this blog tutorial!
LOAD MORE LOGS

0 replies

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome