Ferguson Richardson

Prepare a Minecraft Java Fabric 1.21.11 mod based on Fakedupemod. Features: both. Keybinds: configurable. Ghost inventory behavior: movable. Provide complete source code and build instructions.

Kodari AI
KodariOct 9 at 12:27 pm 2
FakedupeGhostMod
Fabric 1.21.11 mod enabling configurable keybinds for duplicating items via ghost inventory mechanics. Features movable ghost inventory window, both client and server-side duplication support, and full keybind customization through configuration files. Includes complete source code and build instructions for seamless integration.
  1. Build a client-side ghost inventory screen with movable ghost entries and no effect on real items.

  2. Bind it to a configurable key and package the required owo-lib dependency.

Created FakeDupeMod as a client-side Fabric 1.21.11 mod. Press the configurable Open Ghost Inventory key (default G) to open a movable window. Click two ghost slots to swap their displayed items, or click Refresh to recopy your inventory. These are local copies and never move or duplicate real items.

To build and download it in Kodari:

  1. Click Compile in the top bar (on mobile: ⋮ → Compile Project).

  2. Click Compile in the build window.

  3. When it succeeds, click Download.

You can change the key in Minecraft’s Options → Controls.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Fakedupe
gradle.properties
manifest.kod
settings.gradle
Code
9 303
src/client/java/com/kodari/fakedupemod/FakeDupeModClient.java
package com.kodari.fakedupemod;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;

public final class FakeDupeModClient implements ClientModInitializer {
    public static final String MOD_ID = "fakedupemod";

    private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(Identifier.of(MOD_ID, "main"));
    private static final KeyBinding OPEN_GHOST_INVENTORY = new KeyBinding(
            "key.fakedupemod.open_ghost_inventory",
            71,
            CATEGORY
    );

    @Override
    public void onInitializeClient() {
        KeyBindingHelper.registerKeyBinding(OPEN_GHOST_INVENTORY);
        ClientTickEvents.END_CLIENT_TICK.register(FakeDupeModClient::onClientTick);
    }

    private static void onClientTick(MinecraftClient client) {
        if (!OPEN_GHOST_INVENTORY.wasPressed() || client.player == null || client.currentScreen != null) {
            return;
        }

        client.setScreen(new GhostInventoryScreen(client.player.getInventory()));
    }
}