90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!

title

Dynamic JSON Badge Dynamic JSON Badge

This does one thing on its own

adds an item called debug_block

Technical stuff

To use this library add it to your build.gradle file

repositories {
    exclusiveContent {
        forRepository {
            maven {
                name = "Modrinth"
                url = "https://api.modrinth.com/maven"
            }
        }
        filter {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:mql-tir5d-turtle:1.0.0" 
}

correct me if im wrong!

Wiki
Creating a block with an item To create a block and an item use the following code:
import net.msl.blocks;

public class ModName implements ModInitializer {
    public static final Logger LOGGER = LoggerFactory.getLogger("mod-id");

	@Override
	public void onInitialize() {
		LOGGER.info("Initialized Very Cool Mod!");
		Block block = new Block(FabricBlockSettings.create());
		blocks.createBlockWithItem(block, new BlockItem(block, new FabricItemSettings()), new Identifier("mod-id", "cool_block"));
	}
}
Creating a block without an item To create a block use the following code:
import net.msl.blocks;

public class ModName implements ModInitializer {
    public static final Logger LOGGER = LoggerFactory.getLogger("mod-id");

	@Override
	public void onInitialize() {
		LOGGER.info("Initialized Very Cool Mod!");
		Block block = new Block(FabricBlockSettings.create());
		blocks.createBlockNoItem(block, new Identifier("mod-id", "cool_block"));
	}
}
Creating an item To create an item use the following code:
import net.msl.items;

public class ModName implements ModInitializer {
    public static final Logger LOGGER = LoggerFactory.getLogger("mod-id");

	@Override
	public void onInitialize() {
		LOGGER.info("Initialized Very Cool Mod!");
		Item item = new Item(new FabricItemSettings());
		items.createItem(item, new Identifier("mod-id", "cool_item"));
	}
}

Thanks for downloading the mod (:


Project members

Tir5d_Turtle

Member

Details

Licensed MIT
Published 5 months ago
Updated 5 months ago