Files
PlasticGun/src/main/java/systems/brn/plasticgun/lib/CraftingItem.java
2024-12-05 14:46:33 +01:00

18 lines
556 B
Java

package systems.brn.plasticgun.lib;
import net.minecraft.item.Items;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import static systems.brn.plasticgun.lib.Util.id;
public class CraftingItem extends SimpleItem{
public CraftingItem(String name) {
super(new Settings().registryKey(RegistryKey.of(RegistryKeys.ITEM, id(name))), id(name), Items.STICK);
Registry.register(Registries.ITEM, id(name), this);
}
}