Class KhazReg

java.lang.Object
com.khazoda.core.KhazReg

public final class KhazReg extends Object
KhazReg is an opinionated multiloader registration helper built into KhazodaCore that fits a specific registration pattern. It's not recommended to use this class yourself. Its structure may change over time and there may be breaking changes.
  • Constructor Details

    • KhazReg

      public KhazReg(String modId)
  • Method Details

    • register

      public <T, T2 extends T> KhazReg.Entry<T2> register(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, String name, Supplier<T2> supplier)
      ==========[ Common Registration Helpers ]========== Registration methods to call from MainRegistry
    • register

      public <T, T2 extends T> KhazReg.Entry<T2> register(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, String name, Function<net.minecraft.resources.ResourceKey<T2>, T2> factory)
    • item

      public KhazReg.Entry<net.minecraft.world.item.Item> item(String name)
    • item

      public <T extends net.minecraft.world.item.Item> KhazReg.Entry<T> item(String name, Function<net.minecraft.world.item.Item.Properties, T> factory)
    • item

      public <T extends net.minecraft.world.item.Item> KhazReg.Entry<T> item(String name, KhazReg.ItemFactory<T> factory)
    • tool

      public KhazReg.Entry<net.minecraft.world.item.Item> tool(String name, net.minecraft.world.item.ToolMaterial material, net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> mineableBlocks, float attackDamage, float attackSpeed, float miningSpeed)
    • sword

      public KhazReg.Entry<net.minecraft.world.item.Item> sword(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed)
    • spear

      public KhazReg.Entry<net.minecraft.world.item.Item> spear(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed, float range, float throwPower, float minThrowDamage, float maxThrowDamage, float entityDamage, float durabilityMultiplier, float returnSpeed)
    • pickaxe

      public KhazReg.Entry<net.minecraft.world.item.Item> pickaxe(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed)
    • axe

      public KhazReg.Entry<net.minecraft.world.item.AxeItem> axe(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed)
    • shovel

      public KhazReg.Entry<net.minecraft.world.item.ShovelItem> shovel(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed)
    • hoe

      public KhazReg.Entry<net.minecraft.world.item.HoeItem> hoe(String name, net.minecraft.world.item.ToolMaterial material, float attackDamage, float attackSpeed)
    • humanoidArmor

      public KhazReg.Entry<net.minecraft.world.item.Item> humanoidArmor(String name, net.minecraft.world.item.equipment.ArmorMaterial material, net.minecraft.world.item.equipment.ArmorType armorType)
    • horseArmor

      public KhazReg.Entry<net.minecraft.world.item.Item> horseArmor(String name, net.minecraft.world.item.equipment.ArmorMaterial material)
    • nautilusArmor

      public KhazReg.Entry<net.minecraft.world.item.Item> nautilusArmor(String name, net.minecraft.world.item.equipment.ArmorMaterial material)
    • wolfArmor

      public KhazReg.Entry<net.minecraft.world.item.Item> wolfArmor(String name, net.minecraft.world.item.equipment.ArmorMaterial material)
    • block

      public KhazReg.Entry<net.minecraft.world.level.block.Block> block(String name)
    • block

      public <T extends net.minecraft.world.level.block.Block> KhazReg.Entry<T> block(String name, KhazReg.BlockFactory<T> factory)
    • copyBlock

      public KhazReg.Entry<net.minecraft.world.level.block.Block> copyBlock(String name, Supplier<? extends net.minecraft.world.level.block.Block> source)
    • copyBlock

      public <T extends net.minecraft.world.level.block.Block> KhazReg.Entry<T> copyBlock(String name, Supplier<? extends net.minecraft.world.level.block.Block> source, KhazReg.BlockFactory<T> factory)
    • blockItem

      public KhazReg.Entry<net.minecraft.world.item.BlockItem> blockItem(String name, Supplier<? extends net.minecraft.world.level.block.Block> block)
    • blockItem

      public <B extends net.minecraft.world.level.block.Block, I extends net.minecraft.world.item.Item> KhazReg.Entry<I> blockItem(String name, Supplier<? extends B> block, KhazReg.BlockItemFactory<B,I> factory)
    • blockWithItem

      public KhazReg.BlockEntry<net.minecraft.world.level.block.Block, net.minecraft.world.item.BlockItem> blockWithItem(String name)
    • blockWithItem

      public <B extends net.minecraft.world.level.block.Block, I extends net.minecraft.world.item.Item> KhazReg.BlockEntry<B,I> blockWithItem(String name, KhazReg.BlockFactory<B> blockFactory, KhazReg.BlockItemFactory<B,I> itemFactory)
    • sound

      public KhazReg.Entry<net.minecraft.sounds.SoundEvent> sound(String name)
    • tab

      public KhazReg.Entry<net.minecraft.world.item.CreativeModeTab> tab(String name, Supplier<net.minecraft.world.item.ItemStack> icon)
    • tab

      public KhazReg.Entry<net.minecraft.world.item.CreativeModeTab> tab(String name, net.minecraft.network.chat.Component title, Supplier<net.minecraft.world.item.ItemStack> icon)
    • registerAllStatic

      public void registerAllStatic()
      ==========[ Loader Hooks ]========== Called by mod loader entrypoints.
    • registerNeoForge

      public void registerNeoForge(net.minecraft.core.Registry<?> registry)
    • verifyAllStaticRegistrations

      public void verifyAllStaticRegistrations()
    • freeze

      public void freeze()