samuel hale

can u make me a mod that makes me choos what comes out a dropper and a dispencer and make me a menu when i press f10

Kodari AI
KodariOct 2 at 7:43 pm 2
DropperSelector
A Minecraft Fabric mod for version 1.21.11 that lets players control what items are dispensed from droppers and dispensers. Pressing F10 opens a configurable GUI menu where players can select specific items to be ejected from nearby droppers and dispensers. The mod intercepts the dispense behavior, filters the output based on player selections, and provides an intuitive interface for managing item filters per block. Includes support for multiple containers, persistent settings, and seamless integration with vanilla redstone mechanics.
  1. Add an F10 menu to assign the held item as the dropper or dispenser output.

  2. Send those selections to the server and apply them when the blocks dispense.

  3. Create the Fabric 1.21.11 project files and mixin configuration.

Created the Fabric 1.21.11 mod. Press F10 to open the menu; hold the item you want first, then choose whether to assign it to droppers or dispensers.

Selections are shared across the server and reset when it restarts. Each activation uses an item already in the device as the trigger for the configured output.

samuel hale

no you can choose the chance of whta drops out of the dropper so like if i want i can put it like 90% drop rate

Kodari AI
KodariOct 2 at 7:50 pm 1
  1. Add a percentage slider to the F10 menu.

  2. Send the selected percentage with the dispenser/dropper choice.

  3. Roll that chance server-side when the configured output is used.

Added a 0–100% chance slider to the F10 menu. Set it to 90%, hold the item you want, then choose the dispenser or dropper button. On a successful roll, the configured item is used; otherwise, the device uses its normal item.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
13 308
src/client/java/com/kodari/dropchoice/DropChoiceClient.java
package com.kodari.dropchoice;

import com.kodari.dropchoice.client.OutputSelectionScreen;
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.option.KeyBinding;
import net.minecraft.client.util.InputUtil;
import net.minecraft.util.Identifier;
import org.lwjgl.glfw.GLFW;

public final class DropChoiceClient implements ClientModInitializer {
    private static final KeyBinding.Category CATEGORY = KeyBinding.Category.create(Identifier.of(DropChoiceMod.MOD_ID, "general"));
    private static final KeyBinding OPEN_MENU = KeyBindingHelper.registerKeyBinding(
            new KeyBinding("key.dropchoice.open_menu", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_F10, CATEGORY)
    );

    @Override
    public void onInitializeClient() {
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            if (OPEN_MENU.wasPressed() && client.player != null) {
                client.setScreen(new OutputSelectionScreen());
            }
        });
    }
}