From c163e6a464416e6e9544a04c1855fe81f75b4341 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Sat, 20 Jun 2026 01:47:34 -0400 Subject: [PATCH] multimodal --- content/01-core.typ | 33 +++++++++++++++++++++++++-------- content/02-interference.typ | 4 +++- main.typ | 32 +++++++++++++++++++------------- mise.toml | 22 ++++++++++++++++++++-- static/style.css | 2 +- 5 files changed, 68 insertions(+), 25 deletions(-) diff --git a/content/01-core.typ b/content/01-core.typ index c326c94..7dc9913 100644 --- a/content/01-core.typ +++ b/content/01-core.typ @@ -23,16 +23,33 @@ Here is the relevant code path for the optimization. #note[ `onGround` is only ever updated from `move()`, and this branch is the *only* place that `move()` is called. ] -```java public class ItemEntity extends Entity { public void tick() { ... if (this.onGround() && -!(this.getDeltaMovement().horizontalDistanceSqr() > (double)1.0E-5F) && (this.tickCount + -this.getId()) % 4 != 0) { ... } else { this.move(MoverType.SELF, this.getDeltaMovement()); ... } ... -} } +```java +public class ItemEntity extends Entity { + public void tick() { + ... + if (this.onGround() && !(this.getDeltaMovement().horizontalDistanceSqr() > (double)1.0E-5F) && (this.tickCount + this.getId()) % 4 != 0) { + ... + } else { + this.move(MoverType.SELF, this.getDeltaMovement()); + ... + } + ... + } +} -public class Entity { public void move(final MoverType moverType, Vec3 delta) { ... -this.setOnGroundWithMovement(this.verticalCollisionBelow, this.horizontalCollision, movement); ... } +public class Entity { + public void move(final MoverType moverType, Vec3 delta) { + ... + this.setOnGroundWithMovement(this.verticalCollisionBelow, this.horizontalCollision, movement); + ... + } - public void setOnGroundWithMovement(final boolean onGround, final boolean horizontalCollision, - final Vec3 movement) { this.onGround = onGround; ... } } ``` + public void setOnGroundWithMovement(final boolean onGround, final boolean horizontalCollision, final Vec3 movement) { + this.onGround = onGround; + ... + } +} +``` == Observable Drop Delay diff --git a/content/02-interference.typ b/content/02-interference.typ index 7efe4c4..c4be27b 100644 --- a/content/02-interference.typ +++ b/content/02-interference.typ @@ -25,7 +25,9 @@ thread") *also* tracks some entities. In versions before 26.2, there was a bug that caused the client thread and server thread to use the *same* global ID counter. Therefore every entity might increment the counter twice: once when it -spawns in the server, and once when the client begins to track it. +spawns in the server, and once when the client begins to track it. Because this depends on the +position and orientation of the player, and also on the unpredictable scheduling of the two +execution threads, it is impossible to truly compensate for these effects. The solution is to either use a dedicated minecraft server, so that the client and servers run in separate processes, or install a mod which patches the game to use a separate counter for the diff --git a/main.typ b/main.typ index 4b2b47e..5e4cf27 100644 --- a/main.typ +++ b/main.typ @@ -1,10 +1,16 @@ -#set page("us-letter", margin: 0.5in) +#show: it => context if target() == "paged" { + set page("us-letter", margin: 0.5in) + it +} else { + it +} + #set heading(numbering: "1.1 -") #set document(title: [The EID Wireless Masterclass]) #context if target() == "bundle" { - asset("/mojangles-ascii.woff2", read("static/mojangles-ascii.woff2", encoding: none)) - asset("/style.css", read("static/style.css", encoding: none)) + asset("mojangles-ascii.woff2", read("static/mojangles-ascii.woff2", encoding: none)) + asset("style.css", read("static/style.css", encoding: none)) } #let index() = query(document).first() @@ -16,7 +22,7 @@ html.meta(charset: "utf-8") html.meta(name: "viewport", content: "width=device-width, initial-scale=1") html.meta(name: "color-scheme", content: "dark light") - html.link(rel: "stylesheet", href: "/style.css") + html.link(rel: "stylesheet", href: "style.css") html.title(context document.title) }) html.body({ @@ -81,13 +87,13 @@ it } - rawdoc("/index.html", include "content/00-index.typ") - doc("/core.html", include "content/01-core.typ") - doc("/interference.html", include "content/02-interference.typ") - doc("/timing.html", include "content/03-timing.typ") - doc("/design.html", include "content/04-design.typ") - doc("/channels.html", include "content/05-channels.typ") - doc("/transport.html", include "content/06-transport.typ") - doc("/bulk.html", include "content/07-bulk.typ") - doc("/network.html", include "content/08-network.typ") + rawdoc("index.html", include "content/00-index.typ") + doc("core.html", include "content/01-core.typ") + doc("interference.html", include "content/02-interference.typ") + doc("timing.html", include "content/03-timing.typ") + doc("design.html", include "content/04-design.typ") + doc("channels.html", include "content/05-channels.typ") + doc("transport.html", include "content/06-transport.typ") + doc("bulk.html", include "content/07-bulk.typ") + doc("network.html", include "content/08-network.typ") } diff --git a/mise.toml b/mise.toml index 8c490f7..ab42b93 100644 --- a/mise.toml +++ b/mise.toml @@ -2,5 +2,23 @@ tinymist = "latest" typst = "0.15.0" -[tasks.watch] -run = "typst watch main.typ site --format bundle --features bundle,html" +[tasks.watch-bundle] +run = "typst watch main.typ site --format bundle --features bundle,html --port 3000" + +[tasks.watch-html] +run = "typst watch main.typ main.html --format html --features bundle,html --port 3080" + +[tasks.watch-pdf] +run = "typst watch main.typ main.pdf --format pdf --features bundle,html" + +[tasks.bundle] +run = "typst compile main.typ site --format bundle --features bundle,html" + +[tasks.html] +run = "typst compile main.typ main.html --format html --features bundle,html" + +[tasks.pdf] +run = "typst compile main.typ main.pdf --format pdf --features bundle,html" + +[tasks.all] +depends = ["pdf", "html", "bundle"] \ No newline at end of file diff --git a/static/style.css b/static/style.css index 0b8ce57..fc0668e 100644 --- a/static/style.css +++ b/static/style.css @@ -2,7 +2,7 @@ font-family: "Mojangles"; font-style: normal; font-weight: 400; - src: url("/mojangles-ascii.woff2"); + src: url("mojangles-ascii.woff2"); unicode-range: U+0000-007F; }