Menadżer emotikonów

This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.

crafttweaker.api.SmithingManager

Implemented Interfaces

SmithingManager implementuje następujące interfejsy. That means any method available to them can also be used on this class.

Methods

addJSONRecipe

Adds a recipe based on a provided IData. The provided IData should represent a DataPack JSON, this effectively allows you to register recipes for any DataPack supporting IRecipeType systems.

smithing.addJSONRecipe(name as String, data as crafttweaker.api.data.IData);
smithing.addJSONRecipe("recipe_name", {składnik:{item:<item:minecraft:gold_ore>.registryName},result:<item:minecraft:cooked_porkchop>.registryName,Doświadczenie:0.35 jako pływak, czasu gotowania:100});
ParameterTypeDescription
nameStringname of the recipe
datacrafttweaker.api.data.IDatadata representing the json file

addRecipe

Dodaje przepis do tablicy uśmiechu.

smithing.addRecipe(recipeName as String, result as crafttweaker.api.item.IItemStack, base as crafttweaker.api.item.IIngredient, addition as crafttweaker.api.item.IIngredient);
smithing.addRecipe("recipe_name", <item:minecraft:golden_apple>, <item:minecraft:apple>, <tag:forge:ingots/gold>);
ParameterTypeDescription
recipeNameStringNazwa receptury.
resultcrafttweaker.api.item.IItemStackPrzedmiot stworzony przez przepis.
bazacrafttweaker.api.item.IIngredientPierwotny składnik receptury.
dodajcrafttweaker.api.item.IIngredientElement dodany do pozycji bazowej.

getAllRecipes

Return type: List<crafttweaker.api.recipes.WrapperRecipe>

smithing.getAllRecipes();

getRecipeByName

Return type: crafttweaker.api.recipes.WrapperRecipe

smithing.getRecipeByName(name as String);
ParameterTypeDescription
nameStringNo description provided

getRecipesByOutput

Return type: List<crafttweaker.api.recipes.WrapperRecipe>

smithing.getRecipesByOutput(output as crafttweaker.api.item.IIngredient);
ParameterTypeDescription
outputcrafttweaker.api.item.IIngredientNo description provided

removeAll

Remove all recipes in this registry

smithing.removeAll();

removeByModid

Remove recipe based on Registry name modid

smithing.removeByModid(modid as String);
smithing.removeByModid("minecraft");
ParameterTypeDescription
modidStringmodid of the recipes to remove

Usuń przepis na podstawie modida nazwy rejestru z dodanym sprawdzianem wykluczenia, dzięki czemu możesz usunąć cały mod poza kilkoma określonymi.

smithing.removeByModid(modid as String, exclude as crafttweaker.api.recipe.RecipeFilter);
smithing.removeByModid("minecraft", (name as string) => {return name == "orange_wool";});
ParameterTypeDescription
modidStringmodid of the recipes to remove
wykluczcrafttweaker.api.recipe.Filterreceptury na wyjście z usuwania.

removeByName

Remove recipe based on Registry name

smithing.removeByName(name as String);
smithing.removeByName("minecraft:furnace");
ParameterTypeDescription
nameStringregistry name of recipe to remove

removeByRegex

Remove recipe based on regex

smithing.removeByRegex(regex as String);
smithing.removeByRegex("\\d_\\d");
ParameterTypeDescription
regexStringregex to match against

removeRecipe

Remove a recipe based on it's output.

smithing.removeRecipe(output as crafttweaker.api.item.IItemStack);
smithing.removeRecipe(<item:minecraft:glass>);
ParameterTypeDescription
outputcrafttweaker.api.item.IItemStackoutput of the recipe

Properties

NameTypeHas GetterHas Setter
commandStringStringtruefalse