2024-12-29 18:40:56 +01:00
|
|
|
## Remote redstone
|
|
|
|
|
|
|
|
See [retstone.py](retstone.py) for usage example
|
|
|
|
|
|
|
|
### Glossary
|
2024-12-31 21:35:44 +01:00
|
|
|
gateways - the blocks (daylight detector) that read or emit redstone with a specified power, controlled with UDP packets \
|
|
|
|
packet - a bunch of bytes sent over the internet, that do something with a specified gateway
|
|
|
|
|
|
|
|
### Crafting
|
|
|
|
|
|
|
|
To craft a gateway, combine:
|
|
|
|
- nether star
|
|
|
|
- ender chest
|
|
|
|
- chorus flower
|
|
|
|
- daylight detector
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
Each gateway has an ID assigned. To view it, shift right-click a gateway.
|
|
|
|
|
|
|
|
To destroy a gateway, use silk touch.
|
2024-12-29 18:40:56 +01:00
|
|
|
|
|
|
|
### How it works
|
|
|
|
A packet is int / 4 bytes / 32 bits
|
|
|
|
|
|
|
|
Packet format:
|
|
|
|
```
|
|
|
|
[ 01 ] [ 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 ] [ 29 30 31 32 ]
|
|
|
|
action bits 2-28 of repeater id payload
|
|
|
|
```
|
|
|
|
|
|
|
|
- action: `1` to write, `0` to read
|
|
|
|
- payload: power level if writing
|
|
|
|
|
|
|
|
If writing, no response \
|
2025-01-01 11:28:52 +01:00
|
|
|
If reading, response is the power level, or 0 if not powered or no repeater with that ID (or not loaded)
|
2024-12-29 18:40:56 +01:00
|
|
|
|
|
|
|
Reading powers the block down of course \
|
2024-12-30 21:07:47 +01:00
|
|
|
BUT you should power it down (or read), wait some, and then read again
|
2024-12-29 18:40:56 +01:00
|
|
|
|
2025-01-01 11:28:52 +01:00
|
|
|
**WARNING** the socket is not ratelimited or protected in any way. \
|
|
|
|
Though it should be hard to bruteforce, because there's no feedback
|
|
|
|
|
2024-12-29 18:40:56 +01:00
|
|
|
### Retstone
|
|
|
|
|
|
|
|
**Network** translates to **reto** in Esperanto \
|
|
|
|
So retsomething means networked something (posto - mail, retposto - email, ejo - place (site), retejo - website, etc.) \
|
|
|
|
And sometimes we use network instead of internet, same is in that language \
|
|
|
|
Hence retstone
|