You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
Java
40 lines
1.5 KiB
Java
package net.brokenmoon;
|
|
|
|
import net.brokenmoon.tiles.RedstoneLink;
|
|
import net.fabricmc.api.ModInitializer;
|
|
|
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
|
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.item.BlockItem;
|
|
import net.minecraft.registry.Registries;
|
|
import net.minecraft.registry.Registry;
|
|
import net.minecraft.util.Identifier;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
public class Afloydwiremod implements ModInitializer {
|
|
// This logger is used to write text to the console and the log file.
|
|
// It is considered best practice to use your mod id as the logger's name.
|
|
// That way, it's clear which mod wrote info, warnings, and errors.
|
|
public static final Logger LOGGER = LoggerFactory.getLogger("afloydwiremod");
|
|
|
|
public static final String namespace = "afloydwiremod";
|
|
|
|
//Blocks
|
|
public static final Block REDSTONE_LINK = new RedstoneLink(FabricBlockSettings.create().strength(4.0f));
|
|
|
|
@Override
|
|
public void onInitialize() {
|
|
// This code runs as soon as Minecraft is in a mod-load-ready state.
|
|
// However, some things (like resources) may still be uninitialized.
|
|
// Proceed with mild caution.
|
|
|
|
LOGGER.info("Hello from Astoria's Wiremod!");
|
|
|
|
//Registery
|
|
//Register Blocks
|
|
Registry.register(Registries.BLOCK, new Identifier(namespace, "redstone_link"), REDSTONE_LINK);
|
|
Registry.register(Registries.ITEM, new Identifier(namespace, "redstone_link"), new BlockItem(REDSTONE_LINK, new FabricItemSettings()));
|
|
}
|
|
} |