Package net.minheur.techno_lib
Class Utils
java.lang.Object
net.minheur.techno_lib.Utils
Utility class of the mod
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareStacksEqualEnough(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 StringgetBuiltInItemRegistry(net.minecraft.world.level.ItemLike itemLike) This is a shortcut for Recipes Bluider (datagen).static com.google.gson.JsonObjectgetRecipeJson(net.minecraft.data.recipes.FinishedRecipe recipe) You set a recipe, it'll return you a full recipe json.static intgetRGB(int r, int b, int g) You enter an RBG code, and it gets you usable code in effects
-
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 haveactual- the stack you have- Returns:
- if the actual is the same item and has minimum the size of expected
-
getBuiltInItemRegistry
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- theFinishedRecipeyou want to get- Returns:
- the recipe finished json
-