public class RecipeProvider extends java.lang.Object implements IDataProvider
Modifier and Type | Field and Description |
---|---|
protected DataGenerator |
generator |
private static com.google.gson.Gson |
GSON |
private static org.apache.logging.log4j.Logger |
LOGGER |
HASH_FUNCTION
Constructor and Description |
---|
RecipeProvider(DataGenerator generatorIn) |
Modifier and Type | Method and Description |
---|---|
void |
act(DirectoryCache cache) |
private void |
cookingRecipesForMethod(java.util.function.Consumer<IFinishedRecipe> recipeConsumerIn,
java.lang.String cookingMethod,
CookingRecipeSerializer<?> serializerIn,
int cookingTimeIn) |
protected EnterBlockTrigger.Instance |
enteredBlock(Block blockIn) |
java.lang.String |
getName() |
protected InventoryChangeTrigger.Instance |
hasItem(IItemProvider itemIn) |
protected InventoryChangeTrigger.Instance |
hasItem(ItemPredicate... predicates) |
protected InventoryChangeTrigger.Instance |
hasItem(Tag<Item> tagIn) |
protected void |
registerRecipes(java.util.function.Consumer<IFinishedRecipe> consumer) |
private void |
saveRecipe(DirectoryCache cache,
com.google.gson.JsonObject recipeJson,
java.nio.file.Path pathIn) |
protected void |
saveRecipeAdvancement(DirectoryCache cache,
com.google.gson.JsonObject advancementJson,
java.nio.file.Path pathIn) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
private static final org.apache.logging.log4j.Logger LOGGER
private static final com.google.gson.Gson GSON
protected final DataGenerator generator
public RecipeProvider(DataGenerator generatorIn)
public void act(DirectoryCache cache) throws java.io.IOException
act
in interface IDataProvider
java.io.IOException
private void saveRecipe(DirectoryCache cache, com.google.gson.JsonObject recipeJson, java.nio.file.Path pathIn)
protected void saveRecipeAdvancement(DirectoryCache cache, com.google.gson.JsonObject advancementJson, java.nio.file.Path pathIn)
protected void registerRecipes(java.util.function.Consumer<IFinishedRecipe> consumer)
private void cookingRecipesForMethod(java.util.function.Consumer<IFinishedRecipe> recipeConsumerIn, java.lang.String cookingMethod, CookingRecipeSerializer<?> serializerIn, int cookingTimeIn)
protected EnterBlockTrigger.Instance enteredBlock(Block blockIn)
protected InventoryChangeTrigger.Instance hasItem(IItemProvider itemIn)
protected InventoryChangeTrigger.Instance hasItem(Tag<Item> tagIn)
protected InventoryChangeTrigger.Instance hasItem(ItemPredicate... predicates)
public java.lang.String getName()
getName
in interface IDataProvider