Fix gamerule toggles for 26.x renames; add map/skins/pregen + admin favors
Minecraft 26.x renamed every gamerule to snake_case (keepInventory → keep_inventory, doDaylightCycle → advance_time, ...), so the panel's queries hit unknown rules: reads returned nothing, toggles always started from 'off', and sets silently failed. Rules are now defined by candidate names resolved against the live server (works on old and new versions), sets are verified by re-query, and failures surface the server's actual reply. Toggles render only for rules the server reports. Creative additions: - Featured mods on the Mods page: BlueMap (3D web map), SkinRestorer (real skins in offline mode), Chunky (pregen) — verified for 26.2 - BlueMap plumbing: MAP_PORT mapping in compose, in-network detection, 'Open the live world map' link on the Overview - Player modal favors: heal, teleport-to-player, give item - Broadcast box gained a full-screen title mode Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
deeeaf0042
commit
b2ff88b255
9 files changed
+344
-50
No files matched your search
@@ -35,6 +35,32 @@ const PROTECTED = new Set(["fabric-api", "easyauth"]);
|
||||
// by the base slug.
|
||||
const baseSlug = (entry: string) => entry.split(":")[0].toLowerCase();
|
||||
|
||||
// Server-side-only picks that make an offline friends server nicer — no
|
||||
// client installs needed. All verified compatible with Fabric 26.2.
|
||||
const FEATURED = [
|
||||
{
|
||||
slug: "bluemap",
|
||||
emoji: "🗺",
|
||||
title: "BlueMap",
|
||||
description:
|
||||
"Explorable 3D web map of your world, like Google Maps for the server. After installing, the map appears on the Overview page.",
|
||||
},
|
||||
{
|
||||
slug: "skinrestorer",
|
||||
emoji: "🎭",
|
||||
title: "SkinRestorer",
|
||||
description:
|
||||
"Offline-mode servers show everyone as Steve — this restores real skins by username, TLauncher players included.",
|
||||
},
|
||||
{
|
||||
slug: "chunky",
|
||||
emoji: "⚡",
|
||||
title: "Chunky",
|
||||
description:
|
||||
"Pre-generates the world around spawn so nobody lags exploring new chunks. Run `chunky radius 2000` then `chunky start` in Console.",
|
||||
},
|
||||
];
|
||||
|
||||
export default function ModsPage() {
|
||||
const { data, refresh } = useApi<ModsData>("/api/mods", 0);
|
||||
const [query, setQuery] = useState("");
|
||||
@@ -102,6 +128,33 @@ export default function ModsPage() {
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* featured picks */}
|
||||
<Card title="Recommended for this server">
|
||||
<div className="grid gap-2 sm:grid-cols-3">
|
||||
{FEATURED.map((f) => {
|
||||
const already = managedSet.has(f.slug);
|
||||
return (
|
||||
<div key={f.slug} className="flex flex-col gap-1.5 rounded-lg border border-border bg-surface2 p-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-base">{f.emoji}</span>
|
||||
<span className="text-sm font-medium">{f.title}</span>
|
||||
</div>
|
||||
<p className="flex-1 text-[11px] leading-relaxed text-muted">{f.description}</p>
|
||||
<Button
|
||||
size="sm"
|
||||
variant={already ? "ghost" : "primary"}
|
||||
disabled={already}
|
||||
busy={busy === `add-${f.slug}`}
|
||||
onClick={() => void manage(`add-${f.slug}`, { op: "add", slug: f.slug }, `${f.title} added — hit Apply to install`)}
|
||||
>
|
||||
<Download size={12} /> {already ? "Installed" : "Add"}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</Card>
|
||||
|
||||
<div className="grid gap-4 lg:grid-cols-2">
|
||||
{/* Modrinth search */}
|
||||
<Card title="Add from Modrinth">
|
||||
|
||||
Reference in new issue
Block a user