Compatibility
Minecraft: Java Edition
1.20.1–1.20.6
Platforms
Fabric
Supported environments
90% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Links
Creators
Details
Licensed MIT
Published 4 months ago
Updated 5 months ago
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 (: