Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
effcf66
feat(clientmod): add packet, hud and gui capture tooling
Swofty-Developments Aug 1, 2026
23283c9
feat(ravengard): serve the hypixel pack and load polar captures from …
Swofty-Developments Aug 1, 2026
e3936a8
feat(ravengard): recreate the hud from the resource pack shaders
Swofty-Developments Aug 1, 2026
783c77d
feat(ravengard): add animated npc system with dialogue and roaming
Swofty-Developments Aug 1, 2026
94d979e
feat(ravengard): add menu gui system driven by pack sprite offsets
Swofty-Developments Aug 1, 2026
5860757
feat(ravengard): add classes, abilities and config driven items
Swofty-Developments Aug 1, 2026
52fb81f
feat(ravengard): add region system ported from skyblock
Swofty-Developments Aug 1, 2026
c3bc8f3
feat(ravengard): add tutorial flow with class selection
Swofty-Developments Aug 1, 2026
b89455f
feat(ravengard): match the hypixel chat format and add dev commands
Swofty-Developments Aug 1, 2026
7635b11
refactor(ravengard): drop the server side texture pack renderer
Swofty-Developments Aug 1, 2026
d0fc89c
fix(ravengard): share the villager talk cycle as well as idle and walk
Swofty-Developments Aug 1, 2026
587d645
fix(ravengard): ability slots, some cleanups
ArikSquad Aug 1, 2026
b7e5a01
fix(ravengard): disallow opening ravengard menu
ArikSquad Aug 1, 2026
78e0eb9
Merge pull request #838 from ArikSquad/feat/ravengard-stuff
Swofty-Developments Aug 1, 2026
05be696
feat(ravengard): dumb first version
ArikSquad Aug 1, 2026
087e96f
Merge branch 'pr-839' into feat/ravengard-tutorial
Swofty-Developments Aug 2, 2026
bdd35b6
fix(ravengard): keep the menu title plain so the chrome is not applie…
Swofty-Developments Aug 2, 2026
4d6f4bf
feat(ravengard): add the profile system with its captured menus
Swofty-Developments Aug 2, 2026
aaca59a
fix(ravengard): profile id announcements are gray
Swofty-Developments Aug 2, 2026
e84131e
fix(ravengard): pre-class hud and inventory state, captured select cl…
Swofty-Developments Aug 2, 2026
e00b494
feat(ravengard): captured item tooltips with rarity tags and tracked …
Swofty-Developments Aug 2, 2026
8c32c98
fix(ravengard): clicking a talking npc no longer restarts its talk an…
Swofty-Developments Aug 2, 2026
0684796
fix(ravengard): menu titles were pushed off the panel by the wrong le…
Swofty-Developments Aug 2, 2026
dd2546b
feat(ravengard): ability pages from capture, dark gray profile id
Swofty-Developments Aug 2, 2026
0143650
fix(ravengard): chat levels are bold gold
Swofty-Developments Aug 2, 2026
f2b6df1
fix(clientmod): stationary displays with no-op motion are no longer e…
Swofty-Developments Aug 2, 2026
c5a5f52
refactor(ravengard): declarative menu base with the captured chrome b…
Swofty-Developments Aug 2, 2026
1e3a6bc
feat(ravengard): persist inventories per profile
Swofty-Developments Aug 2, 2026
3258189
fix(ravengard): ability items in the crafting grid are not movable
Swofty-Developments Aug 2, 2026
4374708
feat(ravengard): npc shops with buying, selling and crowns
Swofty-Developments Aug 2, 2026
af0f070
feat(ravengard): wayland's browse line plays as his shop opens
Swofty-Developments Aug 2, 2026
58a0b2b
feat(ravengard): crowns command mirroring skyblock's coins
Swofty-Developments Aug 2, 2026
b3039da
feat(ravengard): hud counters update and selling stages through the grid
Swofty-Developments Aug 2, 2026
8ef2bb5
fix(ravengard): shop menus get their sticks and crowns become a datap…
Swofty-Developments Aug 2, 2026
9423dff
refactor(ravengard): stick placement is derived, not declared
Swofty-Developments Aug 2, 2026
4748718
feat(ravengard): rotating stock, live refresh timer and the item stat…
Swofty-Developments Aug 2, 2026
6df6feb
feat(ravengard): skeleton knight and archer mobs with health bars and…
Swofty-Developments Aug 2, 2026
a1056b7
refactor(ravengard): mobs ride the real entity ai
Swofty-Developments Aug 2, 2026
a482ae3
fix(ravengard): rigs no longer deform or spin while turning
Swofty-Developments Aug 2, 2026
724db39
fix(ravengard): the crowns line is the sell value and stays on bought…
Swofty-Developments Aug 2, 2026
a8e74d1
feat(ravengard): starter abilities work off the drop and swap keys
Swofty-Developments Aug 2, 2026
1ac74a1
fix(ravengard): potion tooltips were corrupted by the extraction, and…
Swofty-Developments Aug 2, 2026
662e84f
fix(ravengard): idle skeletons stand still
Swofty-Developments Aug 2, 2026
b08410e
feat(ravengard): segment mob animations from packet state signals
Swofty-Developments Aug 2, 2026
ecde5da
fix(ravengard): turn mob rigs toward their target while chasing
Swofty-Developments Aug 2, 2026
1eb1229
feat(clientmod): ravengard session logger for hands-free rig captures
Swofty-Developments Aug 2, 2026
b704d30
fix(clientmod): null-guard entity data scan in ravengard session logger
Swofty-Developments Aug 2, 2026
d565343
feat(ravengard): skeleton warrior and archer combat clips from sessio…
Swofty-Developments Aug 2, 2026
e1a8c35
feat(ravengard): base-pose clips for glimpsed lobby enemies
Swofty-Developments Aug 2, 2026
62d9029
feat(ravengard): item attribute system and all copied NBT items
Swofty-Developments Aug 2, 2026
a6c1791
feat(ravengard): knight charge attack and admin item browser
Swofty-Developments Aug 2, 2026
02c6e33
fix(ravengard): item browser uses the chest panel from the pack
Swofty-Developments Aug 2, 2026
c9e030a
feat(ravengard): plain chest item browser, class locks and weapon combat
Swofty-Developments Aug 2, 2026
5d717f4
fix(ravengard): whole-rig facing while chasing and standing
Swofty-Developments Aug 2, 2026
bbb0cae
feat(ravengard): in-game animation review stage with manual marking
Swofty-Developments Aug 2, 2026
3762d94
fix(ravengard): lit review stage with in-session capture switching
Swofty-Developments Aug 2, 2026
dd1fe2b
feat: ravengard dungeons game loading, clean up type.game a little
ArikSquad Aug 2, 2026
5d4e7de
Merge pull request #840 from ArikSquad/feat/ravengard-tutorial-3
Swofty-Developments Aug 2, 2026
02c1a9b
feat(ravengard): dungeon room catalog and freestyle generator
Swofty-Developments Aug 3, 2026
33e0ad6
feat(dungeons): shared ravengard layout engine with rotation and test…
Swofty-Developments Aug 3, 2026
c2be292
refactor(dungeons): GameDungeon hierarchy and clean ravengard layout api
Swofty-Developments Aug 3, 2026
a92cb3a
feat(ravengard): dungeon command to transfer to the dungeon server
Swofty-Developments Aug 3, 2026
cd2f56a
feat(ravengard): dungeon orchestration through the orchestrator service
Swofty-Developments Aug 3, 2026
a0891d6
fix(ravengard): dungeon instantiate over the service channel plus adm…
Swofty-Developments Aug 3, 2026
a5e9bb7
refactor(ravengard): dungeon command is staff only without the admin …
Swofty-Developments Aug 3, 2026
1d9bdc8
feat(ravengard): live dungeon minimap through shader icon coordinates
Swofty-Developments Aug 3, 2026
66b0b91
fix(ravengard): local instance joins and a readable dungeon minimap
Swofty-Developments Aug 3, 2026
36c2ab6
fix(ravengard): dungeon stamping loads its chunks and joins stop coll…
Swofty-Developments Aug 3, 2026
5b85d90
fix(ravengard): generation fizzles cured and a real minimap room display
Swofty-Developments Aug 3, 2026
f2d2ee6
feat(dungeons): free-form room footprints replace bounding boxes
Swofty-Developments Aug 3, 2026
7bdb7f2
feat(dungeons): dense full-size generation with a room-state minimap …
Swofty-Developments Aug 3, 2026
38d2e8b
fix(ravengard): aerial admin spawn hovers the start room
Swofty-Developments Aug 3, 2026
17fdd29
fix(ravengard): dungeon lighting computes before the runner enters
Swofty-Developments Aug 3, 2026
41feaa5
fix(ravengard): dungeon join dedupe and observable relight
Swofty-Developments Aug 3, 2026
f2f12f7
feat(ravengard): re-extract mob animations from long session capture
Swofty-Developments Aug 3, 2026
09dafd2
fix(ravengard): stop dungeon stamp dragging template neighbour slivers
Swofty-Developments Aug 3, 2026
b7e2501
feat(ravengard): dynamic tab map and crypt-styled minimap tiles for g…
Swofty-Developments Aug 3, 2026
5b68e85
fix(ravengard): only resend dungeon tab map when its content changes
Swofty-Developments Aug 3, 2026
10fd7db
fix(generic): apply resource pack during configuration phase
Swofty-Developments Aug 3, 2026
ba13ced
feat(ravengard): compose dungeon maps from genuine hypixel room art
Swofty-Developments Aug 3, 2026
5531fa8
fix(ravengard): drop nested inner outlines and seal open room borders
Swofty-Developments Aug 3, 2026
470cd9c
fix(ravengard): resend nearby chunks after dungeon spawn settles
Swofty-Developments Aug 3, 2026
03fb3c4
feat(ravengard): anchor the central citadel and apply the pack once p…
Swofty-Developments Aug 3, 2026
5fb928c
fix(ravengard): use default chunks for generated dungeon instances
Swofty-Developments Aug 3, 2026
969eb05
fix(ravengard): send full bright light with generated dungeon chunks
Swofty-Developments Aug 3, 2026
c0b3f5f
fix(ravengard): adopt the skyblock island instance recipe for dungeons
Swofty-Developments Aug 3, 2026
f06bc14
feat(ravengard): city-base generation with seeded room slot swaps
Swofty-Developments Aug 3, 2026
5059f04
fix(ravengard): minimap player marker above map tiles and identity ta…
Swofty-Developments Aug 3, 2026
0f4a556
fix(ravengard): match the captured dungeon hud stats line and hide th…
Swofty-Developments Aug 3, 2026
24e297f
feat(ravengard): interior-only room swaps constrained by outline colo…
Swofty-Developments Aug 3, 2026
e18e6b7
feat(ravengard): interactable doors, loot chests and satchels in dung…
Swofty-Developments Aug 3, 2026
7d55ff8
fix(ravengard): whole door rigs, click feedback and click gated satchels
Swofty-Developments Aug 3, 2026
099a3ea
fix(ravengard): ground satchels and shrink the rising skulls
Swofty-Developments Aug 3, 2026
9dbe34f
fix(ravengard): channelled interactions, yaw-hinged doors, particle s…
Swofty-Developments Aug 3, 2026
d361baf
fix(ravengard): blue cast bar bossbar and level satchel spawn
Swofty-Developments Aug 3, 2026
b87f033
fix(ravengard): cast bar labels, template ground for chests, uniform …
Swofty-Developments Aug 3, 2026
b93b316
fix(ravengard): preload interactable chunks before spawning entities
Swofty-Developments Aug 3, 2026
7acac16
fix(ravengard): render interactable displays in the default context
Swofty-Developments Aug 3, 2026
0dbf6ad
feat(ravengard): ring tiered loot table and interactable diagnostics
Swofty-Developments Aug 3, 2026
a8f6da1
fix(ravengard): ray tested look gate, closed door spawns and barrier …
Swofty-Developments Aug 3, 2026
854438a
fix(ravengard): flip closed door yaw convention and log channel cancels
Swofty-Developments Aug 3, 2026
4c3fa18
fix(ravengard): distance based look gate and matched door swings
Swofty-Developments Aug 3, 2026
f0644b2
fix(ravengard): toggleable doors and barrier proof hitboxes
Swofty-Developments Aug 3, 2026
b5253fa
feat(ravengard): functional chests from the city's decor rigs and ape…
Swofty-Developments Aug 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 5 additions & 1 deletion clientmod/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ This is a 26.2 mod meant for the developers of this project to easily capture da
- `/getarmorstandinfos <radius>` Gets the position information of armor stands in the defined radius. (wip)
- `/getscoreboardinfo` Prints out the scoreboard information in chat.
- `/copymaptexture [all]` Copy's the texture of a map to the clipboard.
- `/chunkexporter [start|stop <name>|status]` Exports the chunk data of the player. Will be saved to .minecraft/saves
- `/chunkexporter start` starts a chunk-only export.
- `/chunkexporter start block_displays` includes stationary block and item displays.
- `/chunkexporter start ravengard <name>` starts or resumes a named stitched Ravengard capture. Stop it with
`/chunkexporter stop <name>`; checkpoints are stored in `.minecraft/chunkexporter_sessions`.
- `/chunkexporter status` shows the active capture counts.
- `/nbsrecord start`, `/nbsrecord stop <name>`, `/nbsrecord status` records inbound server sounds to
`nbs-recordings/<name>.nbs` and exports custom instrument sounds.
- `Keybind K` Copies the texture ID of the hovered player head into the clipboard.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import gg.itzkatze.thehypixelrecreationmod.commands.*;
import gg.itzkatze.thehypixelrecreationmod.features.KeybindRegistry;
import gg.itzkatze.thehypixelrecreationmod.features.SpraySchemaRecorder;
import gg.itzkatze.thehypixelrecreationmod.features.guicapture.GuiCaptureRecorder;
import gg.itzkatze.thehypixelrecreationmod.features.packetlog.EntityPacketLogger;
import gg.itzkatze.thehypixelrecreationmod.features.worldexport.ChunkExportRecorder;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
Expand Down Expand Up @@ -42,12 +44,18 @@ private static void registerCommands() {
NearbyEntitiesCommand.register();
CopyTabBossbarCommand.register();
CopyAdvancementsCommand.register();
LogPacketsCommand.register();
RavengardSessionCommand.register();
HudCaptureCommand.register();
}

private static void registerTickHandlers() {
ClientTickEvents.END_CLIENT_TICK.register(_ -> {
ChunkExportRecorder.tick();
SpraySchemaRecorder.tick();
EntityPacketLogger.tick();
gg.itzkatze.thehypixelrecreationmod.features.packetlog.RavengardSessionLogger.tick();
GuiCaptureRecorder.tick(net.minecraft.client.Minecraft.getInstance());
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ public static void register() {
.then(ClientCommands.literal("start")
.executes(context -> start(context, ChunkExportRecorder.CaptureMode.CHUNKS))
.then(ClientCommands.literal("block_displays")
.executes(context -> start(context, ChunkExportRecorder.CaptureMode.BLOCK_DISPLAYS))))
.executes(context -> start(context, ChunkExportRecorder.CaptureMode.BLOCK_DISPLAYS)))
.then(ClientCommands.literal("ravengard")
.then(ClientCommands.argument("name", StringArgumentType.string())
.executes(context -> startStitchedRavengard(context,
StringArgumentType.getString(context, "name"))))))
.then(ClientCommands.literal("stop")
.then(ClientCommands.argument("name", StringArgumentType.string())
.executes(context -> {
Expand All @@ -36,7 +40,9 @@ public static void register() {
+ result.blockEntityCount()
+ " block entities, and "
+ result.blockDisplayCount()
+ " stationary block displays to "
+ " stationary block displays, and "
+ result.ravengardObjectCount()
+ " Ravengard dungeon objects to "
+ result.path().getFileName()
+ " and "
+ result.polarPath().getFileName()
Expand Down Expand Up @@ -65,7 +71,9 @@ public static void register() {
+ status.chunkCount()
+ " captured chunks, "
+ status.blockDisplayCount()
+ " stationary block displays, and "
+ " stationary block displays, "
+ status.ravengardObjectCount()
+ " Ravengard dungeon objects, and "
+ status.movingEntityCount()
+ " moving displays excluded (mode: "
+ status.mode().name().toLowerCase()
Expand Down Expand Up @@ -98,4 +106,18 @@ private static int start(
return 0;
}
}

private static int startStitchedRavengard(CommandContext<FabricClientCommandSource> context, String name) {
try {
ChunkExportRecorder.StartResult result = ChunkExportRecorder.start(ChunkExportRecorder.CaptureMode.RAVENGARD, name);
context.getSource().sendFeedback(Component.literal(
"§aRavengard stitched session '" + name + "' is active with "
+ result.initialChunkCount() + " chunks and "
+ result.initialBlockDisplayCount() + " static displays. Stop it with the same name."));
return 1;
} catch (Exception exception) {
context.getSource().sendFeedback(Component.literal("§cFailed to start stitched Ravengard session: " + exception.getMessage()));
return 0;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package gg.itzkatze.thehypixelrecreationmod.commands;

import com.mojang.brigadier.context.CommandContext;
import gg.itzkatze.thehypixelrecreationmod.features.hudcapture.GlyphAtlas;
import gg.itzkatze.thehypixelrecreationmod.features.hudcapture.HudCaptureRecorder;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.ClientCommands;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.network.chat.Component;

public final class HudCaptureCommand {
private HudCaptureCommand() {
}

public static void register() {
ClientCommandRegistrationCallback.EVENT.register((dispatcher, _) ->
RecreationCommand.register(dispatcher, ClientCommands.literal("hudcapture")
.then(ClientCommands.literal("start")
.executes(context -> start(context, true))
.then(ClientCommands.literal("all")
.executes(context -> start(context, false))))
.then(ClientCommands.literal("stop")
.executes(HudCaptureCommand::stop))
.then(ClientCommands.literal("glyphs")
.executes(context -> {
GlyphAtlas.reload();
context.getSource().sendFeedback(Component.literal(
"§aGlyph atlas reloaded: " + GlyphAtlas.size() + " bitmap glyphs"));
return 1;
}))));
}

private static int start(CommandContext<FabricClientCommandSource> context, boolean dedupe) {
try {
HudCaptureRecorder.StartResult result = HudCaptureRecorder.start(dedupe);
context.getSource().sendFeedback(Component.literal(
"§aHUD capture started ("
+ result.glyphCount()
+ " glyphs resolved, "
+ (dedupe ? "unique payloads only" : "every packet")
+ ") → §f"
+ result.path()));
return 1;
} catch (Exception exception) {
context.getSource().sendFeedback(Component.literal("§cFailed to start HUD capture: " + exception.getMessage()));
return 0;
}
}

private static int stop(CommandContext<FabricClientCommandSource> context) {
try {
HudCaptureRecorder.StopResult result = HudCaptureRecorder.stop();
context.getSource().sendFeedback(Component.literal(
"§aHUD capture stopped: "
+ result.eventCount()
+ " events, "
+ result.mapDumpCount()
+ " map images → §f"
+ result.directory()));
return 1;
} catch (Exception exception) {
context.getSource().sendFeedback(Component.literal("§cFailed to stop HUD capture: " + exception.getMessage()));
return 0;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
package gg.itzkatze.thehypixelrecreationmod.commands;

import com.mojang.brigadier.context.CommandContext;
import gg.itzkatze.thehypixelrecreationmod.features.packetlog.EntityPacketLogger;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.ClientCommands;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.ProjectileUtil;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.Vec3;

import java.io.IOException;

public final class LogPacketsCommand {
private static final double TARGET_RANGE = 64.0;
private static final double RAY_TOLERANCE = 1.0;

private LogPacketsCommand() {
}

public static void register() {
ClientCommandRegistrationCallback.EVENT.register((dispatcher, _) ->
dispatcher.register(ClientCommands.literal("logpackets").executes(LogPacketsCommand::toggle)));
}

private static int toggle(CommandContext<FabricClientCommandSource> context) {
Minecraft client = Minecraft.getInstance();
Player player = client.player;
if (player == null || client.level == null) {
context.getSource().sendFeedback(Component.literal("§cNot in a world."));
return 0;
}

Entity target = getLookedAtEntity(client, player);

if (EntityPacketLogger.isActive()) {
boolean sameEntity = target == null || EntityPacketLogger.isTracking(target);
EntityPacketLogger.StopResult result = EntityPacketLogger.stop();
context.getSource().sendFeedback(Component.literal(
"§aStopped logging "
+ result.entityName()
+ " §a(id "
+ result.entityId()
+ ") after "
+ result.packetCount()
+ " packets → §f"
+ result.path()
));

if (sameEntity) {
return 1;
}
}

if (target == null) {
context.getSource().sendFeedback(Component.literal("§cNot looking at any entity."));
return 0;
}

try {
EntityPacketLogger.StartResult result = EntityPacketLogger.start(target);
context.getSource().sendFeedback(Component.literal(
"§aLogging packets for "
+ result.entityName()
+ " §a(id "
+ result.entityId()
+ ", "
+ result.trackedEntityCount()
+ " associated entities) → §f"
+ result.path()
));
return 1;
} catch (IOException | RuntimeException exception) {
context.getSource().sendFeedback(Component.literal("§cFailed to start packet log: " + exception.getMessage()));
return 0;
}
}

private static Entity getLookedAtEntity(Minecraft client, Player player) {
Vec3 eyePosition = player.getEyePosition(1.0f);
Vec3 lookVector = player.getLookAngle();
Vec3 reachVector = eyePosition.add(lookVector.scale(TARGET_RANGE));
AABB searchBox = player.getBoundingBox().expandTowards(lookVector.scale(TARGET_RANGE)).inflate(1.0);

EntityHitResult hitResult = ProjectileUtil.getEntityHitResult(
player,
eyePosition,
reachVector,
searchBox,
entity -> entity != player,
TARGET_RANGE * TARGET_RANGE
);
if (hitResult != null) {
return hitResult.getEntity();
}

Entity closest = null;
double closestDistance = Double.MAX_VALUE;
for (Entity entity : client.level.getEntities(player, searchBox)) {
Vec3 offset = entity.getBoundingBox().getCenter().subtract(eyePosition);
double distanceAlongRay = offset.dot(lookVector);
if (distanceAlongRay <= 0 || distanceAlongRay > TARGET_RANGE) {
continue;
}

double distanceFromRay = offset.subtract(lookVector.scale(distanceAlongRay)).length();
if (distanceFromRay > RAY_TOLERANCE || distanceAlongRay >= closestDistance) {
continue;
}

closestDistance = distanceAlongRay;
closest = entity;
}
return closest;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package gg.itzkatze.thehypixelrecreationmod.commands;

import com.mojang.brigadier.context.CommandContext;
import gg.itzkatze.thehypixelrecreationmod.features.packetlog.RavengardSessionLogger;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.ClientCommands;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.network.chat.Component;

import java.io.IOException;
import java.nio.file.Path;

public final class RavengardSessionCommand {
private RavengardSessionCommand() {
}

public static void register() {
ClientCommandRegistrationCallback.EVENT.register((dispatcher, _) ->
dispatcher.register(ClientCommands.literal("ravengard")
.then(ClientCommands.literal("start").executes(RavengardSessionCommand::start))
.then(ClientCommands.literal("stop").executes(RavengardSessionCommand::stop))));
}

private static int start(CommandContext<FabricClientCommandSource> context) {
if (RavengardSessionLogger.isActive()) {
context.getSource().sendFeedback(Component.literal("§cA ravengard session log is already running."));
return 0;
}
try {
Path path = RavengardSessionLogger.start();
context.getSource().sendFeedback(Component.literal(
"§aRavengard session log started, auto-tracking every rig → §f" + path.getFileName()));
return 1;
} catch (IOException | RuntimeException exception) {
context.getSource().sendFeedback(Component.literal(
"§cFailed to start ravengard session log: " + exception.getMessage()));
return 0;
}
}

private static int stop(CommandContext<FabricClientCommandSource> context) {
if (!RavengardSessionLogger.isActive()) {
context.getSource().sendFeedback(Component.literal("§cNo ravengard session log is running."));
return 0;
}
RavengardSessionLogger.StopResult result = RavengardSessionLogger.stop();
context.getSource().sendFeedback(Component.literal(
"§aRavengard session log stopped after " + result.packetCount() + " packets across "
+ result.rigCount() + " rigs → §f" + result.path()));
return 1;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gg.itzkatze.thehypixelrecreationmod.features;

import gg.itzkatze.thehypixelrecreationmod.features.guicapture.GuiCaptureRecorder;
import net.fabricmc.fabric.api.client.keymapping.v1.KeyMappingHelper;
import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents;
import net.fabricmc.fabric.api.client.screen.v1.ScreenKeyboardEvents;
Expand Down Expand Up @@ -58,7 +59,7 @@ public static void register() {
return false;
}
if (copyGuiKey.matches(key)) {
CopyCurrentGui.copyCurrentGui(client);
GuiCaptureRecorder.toggle(client);
return false;
}
return true;
Expand Down
Loading
Loading