moved to mojmaps

This commit is contained in:
Dani The Skunk 2022-10-20 20:42:56 +00:00
parent 8991ea9ee3
commit 7bb294a0d7
3 changed files with 27 additions and 15 deletions

View File

@ -19,14 +19,14 @@ repositories {
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
dependencies {
minecraft libs.minecraft
mappings variantOf(libs.quilt.mappings) { classifier "intermediary-v2" }
//mappings variantOf(libs.quilt.mappings) { classifier "intermediary-v2" }
// Replace the above line with the block below if you want to use Mojang mappings as your primary mappings, falling back on QM for parameters and Javadocs
/*
mappings loom.layered {
mappings "org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:intermediary-v2"
officialMojangMappings()
}
*/
modImplementation libs.quilt.loader
// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.

View File

@ -0,0 +1,5 @@
package com.danitheskunk.skunkstuff;
public class Blocks {
}

View File

@ -1,11 +1,11 @@
package com.danitheskunk.skunkstuff;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.item.BlockItem;
import net.minecraft.item.ItemGroup;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.Material;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings;
@ -16,15 +16,22 @@ import org.slf4j.LoggerFactory;
public class SkunkStuff implements ModInitializer {
public static final Logger LOGGER = LoggerFactory.getLogger("SkunkStuff");
public static final Block GOBAN_BLOCK =
new Block(QuiltBlockSettings.of(Material.WOOD).strength(2).opaque(false));
public static final Block GOBAN_BLOCK = new Block(QuiltBlockSettings.of(
Material.WOOD).strength(2).opaque(false));
@Override
public void onInitialize(ModContainer mod) {
Registry.register(Registry.BLOCK, new Identifier("skunkstuff", "goban"), GOBAN_BLOCK);
Registry.register(Registry.ITEM, new Identifier("skunkstuff",
"goban"), new BlockItem(GOBAN_BLOCK,
new QuiltItemSettings().group(ItemGroup.MISC)));
Registry.register(Registry.BLOCK,
new ResourceLocation("skunkstuff", "goban"),
GOBAN_BLOCK
);
Registry.register(
Registry.ITEM,
new ResourceLocation("skunkstuff", "goban"),
new BlockItem(GOBAN_BLOCK,
new QuiltItemSettings().group(CreativeModeTab.TAB_MISC)
)
);
LOGGER.info("Hello Quilt world from {}!", mod.metadata().name());
}
}