Compare commits
No commits in common. "1.21.1" and "master" have entirely different histories.
|
@ -1,12 +1,12 @@
|
||||||
org.gradle.jvmargs = -Xmx1G
|
org.gradle.jvmargs = -Xmx1G
|
||||||
|
|
||||||
#Fabric properties
|
#Fabric properties
|
||||||
minecraft_version=1.21.1
|
minecraft_version=1.21.4
|
||||||
yarn_mappings=1.21.1+build.3
|
yarn_mappings=1.21.4+build.7
|
||||||
loader_version=0.16.9
|
loader_version=0.16.9
|
||||||
|
|
||||||
# Fabric API
|
# Fabric API
|
||||||
fabric_version=0.114.0+1.21.1
|
fabric_version=0.114.0+1.21.4
|
||||||
|
|
||||||
#Mod properties
|
#Mod properties
|
||||||
mod_version = 0.9.7
|
mod_version = 0.9.7
|
||||||
|
|
|
@ -2,8 +2,11 @@ package quimufu.structure_item;
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.registry.Registries;
|
||||||
import net.minecraft.registry.Registry;
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.Rarity;
|
import net.minecraft.util.Rarity;
|
||||||
import org.apache.logging.log4j.Level;
|
import org.apache.logging.log4j.Level;
|
||||||
|
@ -17,15 +20,18 @@ public class StructureItemMod implements ModInitializer {
|
||||||
|
|
||||||
public static final String MOD_ID = "structure_item";
|
public static final String MOD_ID = "structure_item";
|
||||||
public static final String MOD_NAME = "Structure Item Mod (Fabric)";
|
public static final String MOD_NAME = "Structure Item Mod (Fabric)";
|
||||||
public static final Item item = new MyItem(new Item.Settings()
|
public static final Item ITEM = Items.register(
|
||||||
|
RegistryKey.of(RegistryKeys.ITEM, Identifier.of(MOD_ID, "item")),
|
||||||
|
MyItem::new,
|
||||||
|
new Item.Settings()
|
||||||
.fireproof()
|
.fireproof()
|
||||||
.rarity(Rarity.RARE)
|
.rarity(Rarity.RARE)
|
||||||
.maxCount(1));
|
.maxCount(1)
|
||||||
|
);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
log(Level.INFO, "Initializing");
|
log(Level.INFO, "Initializing");
|
||||||
Registry.register(Registries.ITEM, Identifier.of(MOD_ID, "item"), item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void log(Level level, String message) {
|
public static void log(Level level, String message) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user