jirkaczlp900

create me a mod for fabric 26.1.2 where i can combine slabs

Kodari AI
KodariJun 24 at 6:38 am 8

I’ll create a Fabric mod that allows you to combine slabs into full blocks.

SlabCombiner
A Fabric mod for Minecraft that enables players to combine two slabs into their corresponding full block. Simply right-click on a placed slab with a matching slab in hand to merge them into a complete block. Works with all vanilla slab types including stone, wood, and other materials. Provides a seamless building experience by allowing quick slab-to-block conversion without breaking and replacing.

Your Fabric mod is ready! This mod allows you to combine slabs by right-clicking on a placed slab while holding a matching slab. The two slabs will merge into their corresponding full block.

Features:

  • Works with all vanilla slab types (wood, stone, deepslate, copper, etc.)

  • Consumes one slab from your hand when combining

  • Plays placement sound on successful combination

  • Only works on single slabs (not double slabs)

  • Respects creative mode (doesn’t consume items)

Build with ./gradlew build and find the compiled mod in build/libs/.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
6 250
src/main/java/com/slabcombiner/SlabCombiner.java
package com.slabcombiner;

import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SlabCombiner implements ModInitializer {
    public static final String MOD_ID = "slabcombiner";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    @Override
    public void onInitialize() {
        LOGGER.info("Slab Combiner initialized!");
        SlabCombineHandler.register();
    }
}