0:03 g'day ladies and gents cubic meter here
0:05 welcome to the wonderful world of
0:08 wireless redstone i am of course talking
0:11 about the process in which two redstone
0:13 machines can communicate with each other
0:15 over some arbitrarily long distance
0:17 without any physical connection between
0:20 the machines for example if i hit this
0:22 button right here
0:24 we can see
0:26 this lamp will light up even though
0:28 there's no physical connection
0:31 going from this button to that lamp this
0:34 form of wireless redstone is based upon
0:37 a very specific property of item
0:40 entities which was discovered by none
0:42 other than to know to name be sure to
0:44 check out his video on the topic to
0:46 learn exactly how he discovered this
0:48 extremely ambiguous mechanic in fact
0:51 when he made his original discovery i
0:52 was extremely privileged to be able to
0:55 work with him on some of the very first
0:57 wireless redstone prototypes he taught me
0:58 me
1:00 how to assign communication channels
1:03 using repeaters and comparators and i
1:05 taught him how to make compact and
1:07 modular wiring however these early
1:09 prototypes tended to come with a lot of
1:11 issues such as interference and
1:13 unintended behaviors and so i finally
1:15 decided to sit down and develop a
1:17 rigorous foundation for the field of
1:20 wireless redstone in this video we will
1:21 go over the mechanic and different
1:23 terminologies to both understand and
1:25 apply walls redstone or useful
1:27 contraptions the field of wilds redstone
1:29 is a very complicated topic the
1:31 establishing names of things is a great
1:33 start allowing people to communicate and
1:34 collaborate as they build upon the
1:36 foundations set in this video in order
1:38 to begin understanding wild's redstone
1:40 we first need to understand subtic
1:44 mechanics in minecraft events such as
1:46 this piston extending
1:53 and each one of these steps is known as
1:57 a game tick exactly equal to 1 20th of a
2:00 second this means that one game tick is
2:02 equal to 50 milliseconds
2:04 making the free game tick extension of
2:07 this piston exactly equal to
2:10 milliseconds events that happen in
2:12 different game ticks are very easy to
2:15 visualize because you can physically see
2:17 the difference in time between
2:21 things like these pistons extending
2:24 however what then happens if two
2:27 mutually exclusive events occur in the
2:29 exact same game tick if we look at these
2:31 observers right here
2:34 each observer has two game ticks of delay
2:35 delay
2:37 meaning we have one two
2:39 three four game ticks before
2:41 this piston starts extending
2:44 but notice that we have the same delay
2:47 for both of these pistons meaning both
2:49 of these pistons will start extending in
2:51 the same game tick this can easily be
2:53 visualized by pulling the pistons
2:55 upwards and powering them at exactly the
2:56 same time
2:58 but then what happens if both of these
3:00 pistons try to extend in the same game tick
3:02 tick
3:04 well if one piston extends
3:06 then the other piston cannot extend how
3:08 on earth does the game decide which
3:12 piston should extend well if we power
3:15 this redstone wire with some observers
3:18 we can clearly see that the first piston
3:19 to extend
3:21 is also the one that's closest to our
3:24 power source however i should note that
3:26 with redstone wire this is not always
3:29 the case redstone wire can be quite
3:31 random in the way in which it orders
3:34 block updates such as pistons extending
3:36 but with this simple case of a straight wire
3:37 wire
3:38 you can clearly see that the closest
3:41 piston is the one that gets chosen to
3:43 extend on this channel i've already
3:46 introduced how rails will in fact
3:49 reverse this order so if i power this side
3:50 side
3:53 the farthest piston will extend first so
3:57 what we can infer from these two tests
3:59 is that the game has a specific order in
4:02 which it processes block events from
4:05 different redstone components let's then
4:07 have a look at a circuit like this
4:10 where we have repeaters and comparators
4:12 after our power sources both of these
4:14 tile sets have exactly the same amount
4:16 of delay so we have two game ticks in
4:18 the comparator and two game ticks from
4:20 the repeater meaning we get four game
4:22 ticks for this tile set and four game
4:24 ticks for this tile set the order of
4:26 these observers will be dependent on
4:30 this rail however if we go ahead and
4:32 power both of the observers in the same
4:33 game tick
4:35 we will see
4:38 that is the piston that is entirely
4:40 powered by repeaters that always powers
4:43 first this is because
4:46 this tile set completely resets the order
4:47 order
4:49 from these observers this is because in
4:51 order to keep track of what things need
4:53 to happen with redstone
4:55 the game will make a list of everything
4:57 that needs to happen and the amount of
4:59 time before that event happens this
5:01 repeater and this comparator are
5:05 scheduled to power two game ticks later
5:08 by these observers in any situation
5:11 the game will schedule updates for a
5:12 repeater before they schedule the
5:15 updates for a comparator this means our
5:18 tiles set with repeaters
5:20 always has priority over our tile set
5:22 with a comparator this is known as tile tick
5:23 tick
5:26 and it even applies to repeaters with
5:28 different delays if we have a look at
5:31 these tile sets we can clearly see that
5:33 we have one two three four game dicks
5:35 before this piston
5:37 and one two three four gain ticks before
5:39 this piston once again
5:42 no matter which way that we power this
5:43 we always see
5:45 that piston powering first this is
5:48 because when the game is creating the
5:51 list of components that need the power
5:54 this repeater is scheduled to power four
5:57 game ticks after this observer however
5:59 this repeater is only scheduled to power
6:02 two game ticks after the observer
6:05 meaning after two gametes have gone by
6:07 we then add another repeater to the list
6:10 which goes in behind this repeater that
6:14 has already been scheduled the result
6:17 is that the longer delay repeater always
6:19 has a higher priority this allows the
6:22 creation of something known as a tile
6:24 set here are the two combinations of
6:26 tile set that we can get for two
6:29 repeaters of two game ticks and four
6:31 gametex delay no matter how i power this
6:33 rail here
6:35 we will always see
6:37 these two lamps turning on in the same
6:39 game deck however
6:42 the order in the same game tick is
6:45 dependent on the tile set and this tile
6:47 set will always be scheduled to power
6:50 before this tile set adding in more components
6:51 components
6:54 gives us more combinations of tile sets
6:56 and the amount of different tile sets
6:58 that you can have scheduled in the same
6:59 game tick
7:02 goes by the factorial of the number of
7:03 different components you can compose
7:06 that tileset from the factorial is
7:09 simply a mathematical expression
7:12 in which the factorial of any number
7:16 is the multiplication of every number
7:19 that precedes it including that number
7:21 so with three different redstone components
7:22 components
7:25 we are able to obtain three factorial
7:27 combinations which is equal to exactly
7:31 six different combinations making use of
7:34 all four variants of a repeater we can
7:39 get four factorial combinations or 24
7:42 different tick phases within
7:45 the same game tick we can take this even
7:47 further adding in a comparator as a
7:51 resident component so that we now have 120
7:52 120
7:54 different combinations so how do all
7:56 these tile sets correlate to wireless
7:59 redstone by using these tile sets we can
8:02 obtain an extremely precise ordering for
8:04 any type of event that we want to happen
8:07 inside the game what i've got here
8:09 is a bunch of redstone components to
8:13 demonstrate how we create item entities
8:15 in a specific order if i trigger this
8:17 entire system
8:19 what it will do
8:21 it will tick freeze at the moment that
8:23 it's about to remove these blocks below
8:25 the items now this is where the item
8:28 entity comes into our redstone
8:31 every single one of these item entities
8:34 has been created in a very precise order
8:37 defined by these tile sets but what's
8:38 important to remember is that all of
8:40 these items were created in the exact
8:43 same game tick if i go ahead
8:47 what you'll see
8:50 is some items will begin falling immediately
9:02 here you can see a very clean modular
9:04 force separation
9:06 of the items falling
9:09 looking from a distance as i unfreeze
9:12 this modular full separation becomes
9:14 extremely evident this separation that
9:16 we can see between the items is based
9:19 upon an important optimization that
9:22 merging has added to item entities
9:23 sitting on the floor
9:26 instead of checking whether there is a
9:27 block underneath them and whether they
9:30 can start falling every single game tick
9:33 an item will only check for this
9:35 every fourth game tick in order to
9:37 create the illusion of continuous
9:40 falling between item entities
9:41 what they will do
9:44 is separate the phase in which they
9:46 check for the block underneath them
9:48 meaning that every fourth item will
9:52 start falling in the same game tick
9:53 which you can clearly see
9:57 when i start untick freezing so by using
9:59 unique tile sets
10:02 we can very precisely control
10:04 the order in which we create item
10:07 entities in the world and this process
10:11 is done globally for an entire dimension
10:13 this means if you have a one
10:16 configuration of tiles in one location
10:18 and another configuration of tiles in
10:20 another location
10:22 or defining
10:24 the phase in which items are dispensed
10:26 into the world
10:28 these machines can communicate to each
10:32 other by the order in which items are falling
10:33 falling
10:35 so what we are literally doing is
10:37 shooting the items out of droppers on
10:39 top of these trapdoors
10:41 and then opening both of the trapdoors
10:44 at the same moment and then seeing which
10:47 phase the item entities start falling
10:49 at which point they'll merely be picked
10:50 up by the hopper
10:53 and then be detected by the comparator
10:55 and that way we can very precisely
10:58 compare the phase in which the items
11:01 begin to fall so how do we actually
11:04 translate the order of item entities
11:06 being shot out of droppers
11:08 into a message which can be sent to
11:11 another machine somewhere on the server
11:13 but what you need to do is develop a protocol
11:14 protocol
11:16 these resource blocks
11:19 represent the phase which repeats every
11:21 fourth game tick each one of these wall
11:24 blocks represents an item being shot out
11:26 of a dropper for each wall that sticks
11:29 up a block we have an item that is being
11:32 measured so what we have is the tile set
11:34 for orange like so
11:37 this one will have the highest priority
11:40 and then we have it powering this rail
11:43 right here we have the dropper which is
11:50 in different positions of the rail we
11:52 can also have filler items
11:56 that can change the phase of other items
11:58 that get dispensed down the line so we
12:00 have the item being measured and then
12:02 two filler items giving us
12:04 the phase diagram
12:07 for our orange the magenta
12:08 is given
12:11 a tile set with a priority
12:14 after our orange our magenta will have
12:17 two filler items dispensed before the
12:19 item that we measure
12:21 and then another two filler items
12:24 dispensed afterwards giving us the phase
12:28 diagram for our magenta somewhere else
12:31 in the world we also have the module
12:33 which is represented by this blue and
12:36 yellow wall this particular machine
12:38 features a clock which will
12:41 self-synchronize over any distance
12:44 because in order to actually communicate
12:46 first we need to actually make sure
12:48 that our tiles are being powered in the
12:51 same game tick if our modules are not
12:53 synchronized as in they are not being
12:57 powered in the same game tick
13:00 their phases will look like these two sets
13:01 sets
13:03 and what you can clearly see
13:05 is that the item that we measure for
13:07 orange is going to start falling in a
13:09 different game tick to the item that we
13:12 measure for magenta the same is also true
13:13 true
13:15 for blue and yellow
13:17 what this actually means
13:20 is that we have given orange the highest
13:22 pearly tile set
13:24 we then give blue
13:27 the next highest priority tile set
13:30 then we give it to magenta
13:31 and then we give it
13:34 to yellow if these modules happen to
13:37 power in exactly the same game tick
13:40 our phase will look like this
13:42 where we have the orange always power first
13:43 first
13:45 on top of the netherright block
13:48 it will push over the blue they have its
13:50 item measured on top of the netherite block
13:51 block
13:53 the magenta would be pushed over to the
13:55 netherright block
13:56 and also the yellow
13:58 this means
14:00 if they happen to align
14:02 all of the items will start falling in
14:05 exactly the same game tick that allows
14:07 these machines to actually detect if
14:10 they randomly coincide
14:14 so if i was to disrupt their clock like so
14:19 there we go
14:24 the modules have now desynchronized
14:27 and this one will run on a 32 gauge
14:30 clock while this module will run on a 31
14:33 game tick clock sooner or later these
14:37 modules will happen to randomly coincide
14:39 and at that point they will know that
14:41 they have synchronized and all of a sudden
14:42 sudden
14:44 they both switch over to the same 32
14:46 gauge clock
14:48 and now they are perfectly synchronized
14:50 and with both modules perfectly synchronized
14:51 synchronized
14:54 i am now able to send a message by
14:57 activating this system right here
14:59 there we go the message is sent almost
15:02 instantly and here's the really cool thing
15:02 thing
15:05 you can experiment with different
15:08 protocols for sending messages for example
15:09 example
15:10 this other part of the module is
15:13 actually what sends the message
15:16 this system is simply to synchronize
15:18 both sides of the telemetry i need to
15:20 use this protocol for the
15:23 self-synchronizing modules because i
15:25 want to make sure that their clocks are
15:27 all synchronized meaning the items that
15:30 we need to detect all need to fall in
15:32 the same phase when i'm sending the
15:34 message however
15:36 i don't need them to be falling in the
15:37 same game tick meaning
15:38 meaning
15:41 that i can use a different protocol that
15:44 uses less items this protocol is very
15:47 similar but only uses two items in each
15:49 of the modules and the coolest thing
15:51 about this protocol is that not only
15:53 does it send the message
15:56 it also sends a confirmation signal back
15:59 to the transmitter to confirm that the
16:00 message was sent
16:03 over here i have a different system
16:06 which uses a different protocol to only
16:08 transmit signals now in order to get
16:09 around this whole complicated
16:12 synchronizing fiasco
16:14 if we are transmitting signals in the overworld
16:15 overworld
16:17 we can develop a very simple clock which
16:19 can synchronize over any distance in the
16:23 overworld daylight sensors will update
16:26 in the same game tick everywhere meaning
16:28 if i go ahead and activate all of these receivers
16:33 all these daylight sensors will be in
16:35 sync with each other
16:38 and so i can go over to the transmitter
16:40 select any one of the colors
16:47 because i'm not receiving a confirmation
16:50 signal i can use a much simpler protocol
16:53 here in the modules i simply dispense
16:55 two items and they start falling in
16:57 different game ticks these two items in
16:59 the receivers can be represented on our
17:01 phase diagram by these two blocks right
17:04 here when i trigger the transmitter
17:06 it will then shove three filler items in
17:08 between them
17:11 forcing the items in the receivers to
17:14 align in the same phase this is how we
17:17 are able to transmit a signal
17:23 so what we do is we grab our ordered
17:25 tile set
17:27 our receivers will have
17:30 the tile sets on the outside
17:32 then our transmitter will have the tile
17:35 set on the inside so that means
17:38 that our receivers will have the items
17:40 on the outside
17:42 transmitter will then shove the filler
17:45 items on the inside these phase diagrams
17:47 can be very useful for defining
17:50 properties about different protocols
17:52 for example
17:54 what if i was to add another white
17:56 receiver somewhere else in the world
17:58 well this means that the protocol would have
17:59 have
18:01 an item like this
18:03 then another item like this
18:05 and then two more items representing
18:08 our two modules if i was to then
18:10 activate the transmitter in between these
18:11 these
18:13 we would see
18:15 one two like this
18:16 the free filler items from our transmitter
18:18 transmitter then
18:19 then
18:21 the two reference items from our
18:24 receiver you can clearly see now that if
18:26 i was to add another white receiver
18:29 somewhere in the world our protocol
18:31 breaks down because now
18:33 this first item from the first receiver
18:35 receiver
18:37 is no longer aligning with the second
18:39 item from the first receiver
18:42 and the same for the second receiver
18:45 so i've just got a schematic ready for a
18:48 second receiver
18:50 we can check to see that with only one receiver
18:53 receiver
18:54 it works perfectly
18:58 fine if i however go ahead and add
19:01 the second receiver like so
19:03 now if i try and send a signal on the
19:12 it won't work at all from this example
19:14 you can clearly see how the protocol
19:17 defines what you can actually do with a
19:19 particular wireless redstone machine
19:21 this makes designing the protocol one of
19:23 the most important steps before you
19:25 start with some really clever wireless
19:26 redstone we can make some really
19:29 powerful tech such as this binary
19:32 encoded enderpearl stasis chamber i had
19:34 some help from a player named jawabro
19:37 who designed this amazing protocol with
19:40 some redstone trickery in the receivers
19:43 jabro managed to turn the modulo 4 that
19:47 we get by default into a modular 2
19:49 making this perfect for sending binary
19:51 signals in the receiver
19:53 we have six different channels
19:55 representing our bits
19:58 as well as a single reference channel at
20:00 all times every one of our bits is
20:02 constantly being compared to our
20:05 reference channel as you can clearly see
20:06 lies on the diamond block
20:08 while everything else sits on the nether
20:11 right block by default however if we
20:13 want to target a particular channel such
20:14 as the red
20:17 what we can do is from our transmitter
20:18 dispense an item
20:21 after the red has fired and this will
20:23 shift all the other colors across as
20:26 well as our reference item at the end
20:29 which now lands in the same phase as our
20:31 red channel if we want to select a
20:34 different channel such as the blue what
20:36 we need to do is dispense the channel
20:38 before it such as the red
20:41 as well as the channel for blue
20:43 meaning everything gets shifted across
20:45 such that the reference item now lands
20:48 in the same phase as our blue channel
20:51 the best part about this protocol is
20:53 that you can add as many receivers as
20:55 you want on the same network and they
20:58 can all receive the same signals from
21:00 any transmitter and so this is what i
21:03 have right here i have three different
21:05 receivers as well as three different transmitters
21:06 transmitters
21:08 all with their own enderpearl stasis
21:10 chambers if we have a look at our tile
21:13 sets we can see we have
21:16 the tartic priority being set by these repeaters
21:17 repeaters
21:20 and then the network is then set by all
21:22 of these repeaters so for all receivers
21:24 that you want to be on the same network
21:26 you want these repeaters to be exactly
21:28 the same and if you want a receiver to
21:30 be on a different network
21:32 all you need to do is change these
21:33 repeaters slightly
21:36 and then you have a new network inside
21:39 the binary decoders i have assigned this receiver
21:40 receiver
21:44 to a binary value of 1 right here
21:46 then over here we have two bits
21:49 dedicated to the particular slice of
21:51 enderpeal stasis chamber so with this
21:53 particular network we are capable of storing
21:55 storing
21:58 15 different locations
22:01 and on each location we can have
22:04 one to four ender pearl stasis chambers
22:06 i just go ahead and activate the clocks
22:08 for all of these receivers
22:12 i can go down to the interface
22:14 i can select location one
22:17 i can select status chamber two
22:26 it should now take me straight there
22:28 there we go
22:31 we're in the second stasis chamber of
22:33 our first location
22:42 i can now go to this interface
22:48 hit this note block and we should be
22:55 perfect
22:59 so clearly you can see how powerful wild
23:01 western can become with some clever
23:03 mechanics if you want to have a play
23:05 around with wiles redstone yourself i
23:07 will be living a world download of this
23:10 world down the description however a
23:13 note of warning in single player the
23:16 whilst redstone can be unreliable this
23:18 is because for some reason in single player
23:19 player
23:21 the client being present and actually
23:23 loading an area
23:25 can cause items to randomly be
23:29 reassigned in the entity list this means
23:30 if you're trying to use wireless
23:32 redstone in singleplayer and you see
23:35 some unexpected behavior it is likely
23:38 because your client is causing items to
23:40 get rehashed on the multiplayer server
23:42 however the wireless telemetry should be
23:44 perfectly reliable
23:46 for now that will be all from the
23:48 wonderful world of wireless redstone
23:50 there should be plenty of new protocols
23:52 and uses to discover for this emerging
23:54 field of redstone and if you like
23:56 technical content like this feel free to
23:58 subscribe it will notify you about any
24:00 future videos i post and show youtube
24:01 that people do in fact enjoy the
24:04 technical side of minecraft thank you
24:05 all very much for watching and i will