Class Utils

java.lang.Object
net.minheur.techno_lib.Utils

public class Utils extends Object
Utility class of the mod
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    areStacksEqualEnough(net.minecraft.world.item.ItemStack expected, net.minecraft.world.item.ItemStack actual)
    Will check if the stack you have is the same and is minimum equals to expected stack.
    static String
    getBuiltInItemRegistry(net.minecraft.world.level.ItemLike itemLike)
    This is a shortcut for Recipes Bluider (datagen).
    static com.google.gson.JsonObject
    getRecipeJson(net.minecraft.data.recipes.FinishedRecipe recipe)
    You set a recipe, it'll return you a full recipe json.
    static int
    getRGB(int r, int b, int g)
    You enter an RBG code, and it gets you usable code in effects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getRGB

      public static int getRGB(int r, int b, int g)
      You enter an RBG code, and it gets you usable code in effects
      Returns:
      a code usable in effects colors
    • areStacksEqualEnough

      public static boolean areStacksEqualEnough(net.minecraft.world.item.ItemStack expected, net.minecraft.world.item.ItemStack actual)
      Will check if the stack you have is the same and is minimum equals to expected stack.
      Parameters:
      expected - the stack you should have
      actual - the stack you have
      Returns:
      if the actual is the same item and has minimum the size of expected
    • getBuiltInItemRegistry

      public static String getBuiltInItemRegistry(net.minecraft.world.level.ItemLike itemLike)
      This is a shortcut for Recipes Bluider (datagen).
      Parameters:
      itemLike - the item you want to get the key
      Returns:
      the built-in registry of the item you gave, as a String
    • getRecipeJson

      public static com.google.gson.JsonObject getRecipeJson(net.minecraft.data.recipes.FinishedRecipe recipe)
      You set a recipe, it'll return you a full recipe json.
      Parameters:
      recipe - the FinishedRecipe you want to get
      Returns:
      the recipe finished json