Chidiebube

📄 Project Manifest & Blueprint OverviewThis specification sheet serves as the final design blueprint for compiling the MTR AI Passengers & Router Addon on Minecraft 1.18.2. It maps out the code infrastructure, network architecture, and user interface maps for your developer or AI tools.

Kodari AI
KodariSep 13 at 9:44 am 1
MTRPassengerRouter
Adds AI-driven passenger spawning and routing to MTR (Metro Transit Railway) networks. Passengers spawn at stations, choose random destinations, and navigate using pathfinding to platforms, trains, and exits. Includes configurable spawn rates, passenger density per station, and visual passenger models. Integrates with MTR's existing station and rail system for realistic transit simulation.

Please provide the complete specification after the “Blueprint Overview” heading. The current request only names the project and Minecraft/Fabric version; it does not define the required features, packages, classes, MTR integration, routes, packets, or UI behavior needed to generate a compiling project.

Chidiebube
📎 1 file 2,276 chars
📄
pasted-code-1789292791741.txt
txt 1 lines
▶
The MTR Passengers Board & Router Addon is a performance-optimized, data-driven Fabric simulation mod for Minecraft 1.18.2 designed as an advanced extension for Minecraft Transit Railway (MTR) version 4.0.5. The centerpiece of the mod is a custom Passengers Board block that players place in the world to open an interactive, multi-tab configuration menu featuring Spawn, Landmark, and Skins sheets, allowing for the creation of massive commuter networks supporting up to 10,000 virtual passengers in total background simulation. To perfectly balance immense visual scale with hardware performance, the mod utilizes an expanded Visual Threshold Limit that dynamically spawns and renders up to 1,000 active physical NPCs per configured area simultaneously, allowing train stations to look incredibly crowded while using velocity-synced limb-swinging walking animations only when players are within rendering distance. The system completely automates visual character customization by querying the Mojang Session API using real player usernames inputted directly into the Skins Tab, causing the passenger entities to dynamically download and display whatever skin is currently uploaded to the Minecraft Launcher. Commuter routines are governed by a System Clock Toggle inside the interface that lets players choose between standard Minecraft Game Time (converting the 24,000-tick day/night cycle into schedule hours) and Real Time Mode (polling the physical computer’s internal clock once every 5 seconds) to trigger automated home-to-work departures and evening station evictions. The Landmark Tab features a custom scrollable EntryListWidget container to cleanly organize destination lists, a global "Refresh Paths" override button to calculate routes along the MTR rail grid, and a critical Split Routing checkbox that fractions the commuter population across multiple open landmarks. Finally, to ensure seamless network maintenance, the list view places a red "❌" deletion button next to every registered zone, which opens an in-menu "Are you sure you wanna delete Area [Name]?" confirmation screen that instantly wipes the targeted array elements from the server's NBT world files and forces an immediate background recalculation of all active passenger pathfinding routes.
Kodari AI
KodariSep 13 at 9:47 am 2

Created the Fabric 1.18.2 project scaffold for MTR Passengers Board & Router, including:

  • Fabric Loom Gradle setup targeting Minecraft 1.18.2

  • Passengers Board block and item registration

  • Extended screen handler and client configuration UI

  • Spawn, Landmark, and Skins tabs

  • Persistent NBT world state

  • Virtual passenger simulation capped at 10,000

  • Visual passenger spawning capped at 1,000 per area

  • Game-time and real-time clock modes

  • Landmark route recalculation

  • Split-routing toggle

  • Mojang skin profile lookup

  • Server/client networking

  • Fabric mod metadata and language/model resources

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
19 791
src/main/java/com/kodari/mtrpassengers/MtrPassengerRouter.java
package com.kodari.mtrpassengers;

import com.kodari.mtrpassengers.network.BoardActions;
import com.kodari.mtrpassengers.simulation.PassengerSimulation;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.screenhandler.v1.ScreenHandlerRegistry;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.minecraft.block.Block;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

public final class MtrPassengerRouter implements ModInitializer {
    public static final String MOD_ID = "mtr_passengers_router";
    public static final Identifier BOARD_ID = new Identifier(MOD_ID, "passengers_board");
    public static final Block PASSENGERS_BOARD = Registry.register(
            Registry.BLOCK,
            BOARD_ID,
            new PassengersBoardBlock()
    );
    public static final Item PASSENGERS_BOARD_ITEM = Registry.register(
            Registry.ITEM,
            BOARD_ID,
            new BlockItem(PASSENGERS_BOARD, new FabricItemSettings().group(ItemGroup.MISC))
    );
    public static final ScreenHandlerType<BoardScreenHandler> BOARD_SCREEN_HANDLER =
            ScreenHandlerRegistry.registerExtended(new Identifier(MOD_ID, "board"), BoardScreenHandler::new);

    @Override
    public void onInitialize() {
        BoardActions.registerServerReceivers();
        ServerTickEvents.END_WORLD_TICK.register(PassengerSimulation::tick);
    }
}