diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a8cf9c3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pdf +site +.idea/ diff --git a/content/bulk.typ b/content/bulk.typ new file mode 100644 index 0000000..73b9f9f --- /dev/null +++ b/content/bulk.typ @@ -0,0 +1,12 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/bulk/", + title: [Bulk Transport], +) + += Tileable Receivers += Interleaved vs Sequential Channels += Chained vs Shared Reference += Broadcast and Multicast + diff --git a/content/channels.typ b/content/channels.typ new file mode 100644 index 0000000..de186b7 --- /dev/null +++ b/content/channels.typ @@ -0,0 +1,12 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/channels/", + title: [Channels], +) + += Static Channel Allocation += Dynamic Channel Selectors += Looped Connections + + diff --git a/content/core.typ b/content/core.typ new file mode 100644 index 0000000..a00bc84 --- /dev/null +++ b/content/core.typ @@ -0,0 +1,11 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/core/", + title: [Core Mechanics], +) + += Entity IDs += Stationary Item Optimization += Observable Drop Delay + diff --git a/content/design.typ b/content/design.typ new file mode 100644 index 0000000..aebd411 --- /dev/null +++ b/content/design.typ @@ -0,0 +1,17 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/design/", + title: [Design Considerations], +) + += Tilesets +== Binary vs Lexicographic += Block Event Delay += Synchronization +== Daylight Detector +== Geyser +== Ender Pearl +== Synchronization Protocols += Settling time += Horizontal vs Vertical Arrangement diff --git a/content/interference.typ b/content/interference.typ new file mode 100644 index 0000000..b4d7cd1 --- /dev/null +++ b/content/interference.typ @@ -0,0 +1,12 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/interference/", + title: [Interference], +) + += Entity Spawns += Single-Player (before 26.2) += Mixed Diode Interference += Lazy chunks += Reloading Chunks diff --git a/content/network.typ b/content/network.typ new file mode 100644 index 0000000..eef6022 --- /dev/null +++ b/content/network.typ @@ -0,0 +1,14 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/network/", + title: [Network Protocols], +) + += Collision Prevention +== Checkbit +== Queue += Load Balancing += Private Channels += Self Syncing Protocol + diff --git a/content/transport.typ b/content/transport.typ new file mode 100644 index 0000000..e4f6a88 --- /dev/null +++ b/content/transport.typ @@ -0,0 +1,14 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/transport/", + title: [Transport Protocols], +) + += Mod 4 Binary += Mod 2 Binary += Mod 4 Quaternary += Transceivers += Logical Operations += Transport Protocol Catalog + diff --git a/docs.typ b/docs.typ new file mode 100644 index 0000000..4823fe8 --- /dev/null +++ b/docs.typ @@ -0,0 +1,31 @@ +#import "/static/index.typ": stylesheets + +#let docs-page(title: none, route: none, content) = { + document( + route + "index.html", + title: title, + html.html({ + html.head({ + html.meta(charset: "utf-8") + html.meta(name: "viewport", content: "width=device-width, initial-scale=1") + html.meta(name: "color-scheme", content: "dark light") + for stylesheet in stylesheets { + html.link(rel: "stylesheet", href: stylesheet) + } + html.title(context title) + }) + html.body({ + html.header({ + html.h1(context title) + }) + html.main(content) + }) + }), + ) +} + +#let callout(kind: str, body) = html.div(class: "callout " + kind, body) + +#let note = callout.with(kind: "note") +#let warn = callout.with(kind: "caution") +#let tip = callout.with(kind: "tip") diff --git a/index.typ b/index.typ new file mode 100644 index 0000000..24db1de --- /dev/null +++ b/index.typ @@ -0,0 +1,40 @@ +#import "/docs.typ": docs-page, note, tip, warn + +#show: docs-page.with( + route: "/", + title: [The Wireless Masterclass], +) + +Welcome! Here, we will talk about Entity ID based wireless redstone for Minecraft Java Edition. + +#warn[ + Until version 26.2, this only works on multiplayer servers. \ + Starting with version 26.2, singleplayer is also supported. See @singleplayer for details. +] + +#context { + list( + ..query(document).map( + it => { + link(it.location(), it.title) + list(..query(heading.where(level: 1).within(it.location())).map(it => link(it.location(), it.body))) + }, + ), + ) + + // for page in query(title) { page } + // outline(target: selector.or(heading)) + + + // repr(query(selector(heading).within(locate(doc.location())))) + + //for item in query(selector.or(heading.where(depth < 2), title)) { + //str(item.body) + //} +} + +// #outline(title: none, depth: 2) + += Objectives +== Use Cases +== Advantages and Limitations diff --git a/main.typ b/main.typ new file mode 100644 index 0000000..41f2bf6 --- /dev/null +++ b/main.typ @@ -0,0 +1,12 @@ +#set heading(numbering: "1.") + +#include "static/index.typ" +#include "index.typ" + +#include "content/core.typ" +#include "content/interference.typ" +#include "content/design.typ" +#include "content/channels.typ" +#include "content/transport.typ" +#include "content/bulk.typ" +#include "content/network.typ" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..8c490f7 --- /dev/null +++ b/mise.toml @@ -0,0 +1,6 @@ +[tools] +tinymist = "latest" +typst = "0.15.0" + +[tasks.watch] +run = "typst watch main.typ site --format bundle --features bundle,html" diff --git a/static/font/LibertinusKeyboard-Regular.woff2 b/static/font/LibertinusKeyboard-Regular.woff2 new file mode 100644 index 0000000..2db0a64 Binary files /dev/null and b/static/font/LibertinusKeyboard-Regular.woff2 differ diff --git a/static/font/LibertinusMath-Regular.woff2 b/static/font/LibertinusMath-Regular.woff2 new file mode 100644 index 0000000..98dc5e0 Binary files /dev/null and b/static/font/LibertinusMath-Regular.woff2 differ diff --git a/static/font/LibertinusMono-Regular.woff2 b/static/font/LibertinusMono-Regular.woff2 new file mode 100644 index 0000000..fb62fca Binary files /dev/null and b/static/font/LibertinusMono-Regular.woff2 differ diff --git a/static/font/LibertinusSans-Bold.woff2 b/static/font/LibertinusSans-Bold.woff2 new file mode 100644 index 0000000..a898d25 Binary files /dev/null and b/static/font/LibertinusSans-Bold.woff2 differ diff --git a/static/font/LibertinusSans-Italic.woff2 b/static/font/LibertinusSans-Italic.woff2 new file mode 100644 index 0000000..3c4c693 Binary files /dev/null and b/static/font/LibertinusSans-Italic.woff2 differ diff --git a/static/font/LibertinusSans-Regular.woff2 b/static/font/LibertinusSans-Regular.woff2 new file mode 100644 index 0000000..8f0f029 Binary files /dev/null and b/static/font/LibertinusSans-Regular.woff2 differ diff --git a/static/font/LibertinusSerif-Bold.woff2 b/static/font/LibertinusSerif-Bold.woff2 new file mode 100644 index 0000000..2604c20 Binary files /dev/null and b/static/font/LibertinusSerif-Bold.woff2 differ diff --git a/static/font/LibertinusSerif-BoldItalic.woff2 b/static/font/LibertinusSerif-BoldItalic.woff2 new file mode 100644 index 0000000..c1d3632 Binary files /dev/null and b/static/font/LibertinusSerif-BoldItalic.woff2 differ diff --git a/static/font/LibertinusSerif-Italic.woff2 b/static/font/LibertinusSerif-Italic.woff2 new file mode 100644 index 0000000..f9331a7 Binary files /dev/null and b/static/font/LibertinusSerif-Italic.woff2 differ diff --git a/static/font/LibertinusSerif-Regular.woff2 b/static/font/LibertinusSerif-Regular.woff2 new file mode 100644 index 0000000..6193866 Binary files /dev/null and b/static/font/LibertinusSerif-Regular.woff2 differ diff --git a/static/font/LibertinusSerif-Semibold.woff2 b/static/font/LibertinusSerif-Semibold.woff2 new file mode 100644 index 0000000..268c66e Binary files /dev/null and b/static/font/LibertinusSerif-Semibold.woff2 differ diff --git a/static/font/LibertinusSerif-SemiboldItalic.woff2 b/static/font/LibertinusSerif-SemiboldItalic.woff2 new file mode 100644 index 0000000..a33601d Binary files /dev/null and b/static/font/LibertinusSerif-SemiboldItalic.woff2 differ diff --git a/static/font/LibertinusSerifDisplay-Regular.woff2 b/static/font/LibertinusSerifDisplay-Regular.woff2 new file mode 100644 index 0000000..c10593a Binary files /dev/null and b/static/font/LibertinusSerifDisplay-Regular.woff2 differ diff --git a/static/font/LibertinusSerifInitials-Regular.woff2 b/static/font/LibertinusSerifInitials-Regular.woff2 new file mode 100644 index 0000000..123738c Binary files /dev/null and b/static/font/LibertinusSerifInitials-Regular.woff2 differ diff --git a/static/font/Minecraft-Seven_v2.woff2 b/static/font/Minecraft-Seven_v2.woff2 new file mode 100644 index 0000000..95c4390 Binary files /dev/null and b/static/font/Minecraft-Seven_v2.woff2 differ diff --git a/static/index.typ b/static/index.typ new file mode 100644 index 0000000..9178ffb --- /dev/null +++ b/static/index.typ @@ -0,0 +1,42 @@ +#let fonts = ( + (src: "/font/Minecraft-Seven_v2.woff2", name: "Mojangles", style: "normal", weight: 400), + (src: "/font/LibertinusKeyboard-Regular.woff2", name: "Libertinus Keyboard", style: "normal", weight: 400), + (src: "/font/LibertinusMath-Regular.woff2", name: "Libertinus Math", style: "normal", weight: 400), + (src: "/font/LibertinusMono-Regular.woff2", name: "Libertinus Mono", style: "normal", weight: 400), + (src: "/font/LibertinusSans-Bold.woff2", name: "Libertinus Sans", style: "normal", weight: 700), + (src: "/font/LibertinusSans-Italic.woff2", name: "Libertinus Sans", style: "italic", weight: 400), + (src: "/font/LibertinusSans-Regular.woff2", name: "Libertinus Sans", style: "normal", weight: 400), + (src: "/font/LibertinusSerif-Bold.woff2", name: "Libertinus Serif", style: "normal", weight: 700), + (src: "/font/LibertinusSerif-BoldItalic.woff2", name: "Libertinus Serif", style: "italic", weight: 700), + (src: "/font/LibertinusSerif-Italic.woff2", name: "Libertinus Serif", style: "italic", weight: 400), + (src: "/font/LibertinusSerif-Regular.woff2", name: "Libertinus Serif", style: "normal", weight: 400), + (src: "/font/LibertinusSerif-Semibold.woff2", name: "Libertinus Serif", style: "normal", weight: 600), + (src: "/font/LibertinusSerif-SemiboldItalic.woff2", name: "Libertinus Serif", style: "italic", weight: 600), + (src: "/font/LibertinusSerifDisplay-Regular.woff2", name: "Libertinus Display", style: "normal", weight: 400), + (src: "/font/LibertinusSerifInitials-Regular.woff2", name: "Libertinus Initials", style: "normal", weight: 400), +) + +#asset( + "font.css", + fonts + .map(it => { + "@font-face{" + "font-family:" + repr(it.name) + ";" + "font-style:" + str(it.style) + ";" + "font-weight:" + str(it.weight) + ";" + "src: url(" + repr(it.src) + ");" + "}" + }) + .join(" "), +) + +#asset("./style.css", read("style.css", encoding: none)) + +#for font in fonts { + asset(font.src, read("." + font.src, encoding: none)) +} + +#let stylesheets = ( + "/font.css", + "/style.css", +) diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..2cd112d --- /dev/null +++ b/static/style.css @@ -0,0 +1,92 @@ +html { + font-family: "Libertinus Serif", serif; + font-size: 18pt; + line-height: 1.5em; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "Mojangles", "monospace"; +} + +code { + font-family: "Libertinus Mono", monospace; +} + +math { + font-family: "Libertinus Math", math; +} + +main, header, footer { + max-width: 80ch; + margin-inline: auto; +} + +li > * { + margin-block: 0; +} + +.callout { + display: block; + margin-inline: -2ch; + padding-inline: 2ch; + padding-block: 1ch; + border-radius: 4pt; + border-width: 1pt; + border-style: solid; + + color: var(--mode-color); + border-color: rgba(from var(--mode-color) r g b); + background-color: rgba(from var(--mode-color) r g b / 5%); +} + +.callout::before { + content: var(--mode-name); + padding-inline-end: 1ch; + font-family: "Mojangles", "monospace"; + display: inline-block; + float: left; +} + +.callout > p:first-child { + display: inline; +} + +.note { + --mode-name: "Note"; +} + +.caution { + --mode-name: "Caution"; +} + +.tip { + --mode-name: "Tip"; +} + +@media (prefers-color-scheme: dark) { + .note { + --mode-color: cyan; + } + + .caution { + --mode-color: coral; + } + + .tip { + --mode-color: springgreen; + } +} + +@media (prefers-color-scheme: light) { + .note { + --mode-color: blue; + } + + .caution { + --mode-color: orangered; + } + + .tip { + --mode-color: seagreen; + } +} \ No newline at end of file