[::] Ender Storage-Style Dye-Coded Ender Chests (4096 unique inventories)

๐ŸŽ™๏ธ tryashtar ยท 122 points ยท Posted at 20:52:35 on August 7, 2015 ยท (Permalink)


HorribleDirectBrownbutterfly

๐ŸŽ™๏ธ tryashtar ยท 8 points ยท Posted at 20:58:12 on August 7, 2015 ยท (Permalink)*

Hey there! I finished thismultiplayer-friendly command block setup a while ago and thought I would finally share it -- it's dyeable ender chests in vanilla Minecraft.

Place down any hopper and an ender chest on top, then stand on it to create a "dye input vat" or something. This hopper will not accept or deposit items into inventories, but other hoppers can pull dyes out of it.

A dye display will appear based on the direction of the ender chest you placed showing what dyes are currently in the first three slots of the dye selector. If there are three dyes in those slots, it will send an ender chest to you, ready to be filled.

The ender chest with that dye code can then be summoned at any dye station with the same code, allowing 4096 unique inventories. If glass is placed in the fifth slot of the hopper, the dye indicators will turn invisible.

The largest error with this has to do with chunks unloading, and it is unavoidable with current Minecraft. If you create a station with a dye combo and another station already exists with that combo in an unloaded chunk, it will create an empty ender chest instead of calling the correct one, which can lead to duplicate chests :(

Anyway, this takes two compressed commands, so here they are:

http://pastebin.com/m75aKe19
http://pastebin.com/w13166k7

Enjoy!

EDIT: Updated the pastebin commands. The system now works anywhere! Yay! No more confusion due to chunks unloading.

Skylord_Brebro ยท 1 points ยท Posted at 01:07:03 on August 8, 2015 ยท (Permalink)

Hey I know I might be a little bit late but here is a link for a command compressor that keeps things tidy and in one area is is very user friendly and can be modified a lot. Also the problem that you are having with the enderchests not registering because it is in a unloaded chunk might be fixed on servers as long as the command blocks and ender chests are saved in the spawn chunks and this command compressor might help you achieve this. http://mrgarretto.com/cmdcombiner

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 01:34:05 on August 8, 2015 ยท (Permalink)*

The unloaded chunk problem has to do with the location of the chests and has nothing to do with the placement of command blocks in the spawn chunks. I could probably fix it if the spawn chunks were always centered on (0,0), but otherwise it's impossible.

I use my own command compactor for a few reasons. Although the one you linked makes the compacted command slightly smaller than mine, mine has options to keep/remove the install block, create a quick-uninstall block, and can optionally place all the commands at bedrock level.

If that website had all of those features, I would probably use it. Otherwise, I'll stick with my own.

Evtema3 ยท 2 points ยท Posted at 03:04:05 on August 8, 2015 ยท (Permalink)

PM /u/MrGarretto to see if he can do that. I would be glad to have more expansive options on his command combiner like you suggested!

CakeX ยท 2 points ยท Posted at 03:27:06 on August 8, 2015 ยท (Permalink)

What is "your" command compactor? Is it publicly available?

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 03:31:12 on August 8, 2015 ยท (Permalink)*

Yeah. I don't know how to make/code a website, so I made it in C# as a program. Here's a mediocre gif showing it off and here's the link to the Visual Studio project file.

I'm not allowed to link directly to an exe file here, but if you download and extract that, the exe is located at

One Command > Bin > Debug > One Command.exe

beware, the code is ugly...

[deleted] ยท 2 points ยท Posted at 00:39:54 on August 9, 2015 ยท (Permalink)

[deleted]

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 00:56:46 on August 9, 2015 ยท (Permalink)

The program has a checkbox to control that. When checked, all the commands are placed at y=0. When unchecked, all the commands are placed above the install block.

It still relies on the user to install it in spawn chunks; there's no way to automatically set it there.

Skylord_Brebro ยท 1 points ยท Posted at 18:58:03 on August 12, 2015 ยท (Permalink)

is it possible to teleport the chests back to where the command contraption is and teleport it back when the player gets near the setup. If this is what is happening then wouldn't this be flawless on servers because of the spawn chunks that are always loaded?

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 21:33:47 on August 12, 2015 ยท (Permalink)*

The original system teleported the chests to (0,300,0). My spawn chunks were centered around (0,0) and it still caused issues, so I changed how the system worked, then fixed some more issues.

It's possible that could work when added to the other changes I made; I'll test it out and update the link if it works.

EDIT: It works as far as I can tell. Updated.

Evtema3 ยท 2 points ยท Posted at 21:45:47 on August 7, 2015 ยท (Permalink)

This is absolutely amazing! :D

GINGAR ยท 2 points ยท Posted at 02:40:01 on August 8, 2015 ยท (Permalink)

This is actually a very very interesting concept.

TerrorBite ยท 2 points ยท Posted at 12:01:57 on August 8, 2015 ยท (Permalink)

Nice Easter egg.

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 14:09:48 on August 8, 2015 ยท (Permalink)

Thanks! I'm glad someone found it :)

starwarswii ยท 1 points ยท Posted at 19:28:35 on August 8, 2015 ยท (Permalink)

Can we get an image and/or explanation of the setup? I can't really run the two commands right now.

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 20:57:48 on August 8, 2015 ยท (Permalink)

The setup isn't too interesting to look at physically, but I can give you a rundown on some of the more technical parts of the system.

Most of the commands are "test for dye with X data value in Y slot, set Y score to X if so."

A bunch more commands are "if X score is Y, set display armor stand item X to dye with damage Y."

When a player gets near a station, the station tries to teleport an ender chest cart with the matching dye scores. If it can't find one, it creates one and sets the dye scores to match the station.

When you leave a station or change a dye, the chests are teleported 300 blocks above the station.

Mostly repetitive commands, nothing terribly complicated per se.

starwarswii ยท 1 points ยท Posted at 21:06:25 on August 8, 2015 ยท (Permalink)

How do you create a variable-named entity?

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 01:02:40 on August 9, 2015 ยท (Permalink)

It's not that dynamic--there's three armor stands (Dye1, Dye2, Dye3) and there scores for the station (dye1, dye2, dye3).

An example command would be

/execute @e[type=ArmorStand,name=EnderChestStation,score_dye2_min=8,score_dye2=8] ~ ~ ~ replaceitem entity @e[type=ArmorStand,name=Dye2,c=1] slot.weapon dye 8

There would be 16 of those per armor stand and 3 armor stands, so 48 commands are used to display the dye icons.

starwarswii ยท 1 points ยท Posted at 01:07:37 on August 9, 2015 ยท (Permalink)

No, I mean't how do you create a new ender chest based on the color pattern?

๐ŸŽ™๏ธ tryashtar ยท 1 points ยท Posted at 01:18:52 on August 9, 2015 ยท (Permalink)

Oh, I see. I'll try to paraphrase some commands for you.

scoreboard players set @e[type=MinecartChest,name=EnderChest] qualify 0

execute @e[type=ArmorStand,name=EnderChestStation,score_playerentered_min=1,score_dye1_min=0,score_dye1=0] ~ ~ ~ scoreboard players add @e[type=MinecartChest,name=EnderChest,score_dye1_min=1,score_dye1=1] qualify 1

That second command add 1 to every ender chest which has bonemeal as its first dye, assuming the station you walked up to has bonemeal as its first dye. There are several of these which together build a "qualify score." Basically, copy that command for each dye value and each dye score (1-3).

After that, if an ender chest has a qualify score of 3, that means it matched the dye1, dye2, and dye3 of the station.

execute @e[type=ArmorStand,name=EnderChestStation,score_playerentered_min=1] ~ ~ ~ tp @e[type=MinecartChest,score_qualify_min=3] ~ ~ ~ @e[type=ArmorStand,c=1]

I probably used stats or something to determine if that command was successful. If not...

execute @e[type=ArmorStand,name=EnderChestStation,score_playerentered_min=1,score_foundchest=0] ~ ~ ~ summon MinecartChest ~ ~ ~  {CustomName:EnderChest,(whatever crap makes the display tile an ender chest)}

execute @e[type=ArmorStand,name=EnderChestStation,score_playerentered_min=1,score_foundchest=0] ~ ~ ~ scoreboard players operation @e[type=MinecartChest,name=EnderChest,c=1] dye1 = @e[type=ArmorStand,c=1] dye1

Repeat that last one with dye2 and dye3.

I hope that was helpful to you. If you have any other questions, or if that was completely useless, please don't hesitate to ask!

starwarswii ยท 1 points ยท Posted at 01:20:51 on August 9, 2015 ยท (Permalink)

That was very helpful. Thanks!

[deleted] ยท 1 points ยท Posted at 20:57:00 on August 7, 2015 ยท (Permalink)

[deleted]

Evtema3 ยท 2 points ยท Posted at 21:40:39 on August 7, 2015 ยท (Permalink)

OP linked to two compressed commands.

Anyway, this takes two compressed commands, so here they are:

http://pastebin.com/m75aKe19

http://pastebin.com/w13166k7