Skip to content

Commit

Permalink
registry
Browse files Browse the repository at this point in the history
  • Loading branch information
unix-supremacist committed Dec 8, 2023
1 parent 5d3f857 commit 620b115
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package io.github.unix_supremacist.alabli;

import io.github.unix_supremacist.Alchemist;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.level.block.Block;

public class AlabliRegistry {
public static void registerItem(Item item, String name){
Registry.register(BuiltInRegistries.ITEM, new ResourceLocation(Alchemist.MODID, name), item);
Alabli.items.add(item);
}

public static void registerBlock(Block block, String name){
Registry.register(BuiltInRegistries.BLOCK, new ResourceLocation(Alchemist.MODID, name), block);
}
}

0 comments on commit 620b115

Please sign in to comment.