Package dev.latvian.mods.kubejs.recipe
Class RecipesKubeEvent
java.lang.Object
dev.latvian.mods.kubejs.recipe.RecipesKubeEvent
- All Implemented Interfaces:
KubeEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Collection<KubeRecipe> final RecipeTypeFunctionfinal RecipeTypeFunctionstatic final Patternfinal RegistryOpsContainerfinal Map<net.minecraft.resources.ResourceLocation, KubeRecipe> static final Patternfinal RecipeSchemaStoragefinal RegistryAccessContainerfinal Collection<KubeRecipe> final net.minecraft.server.packs.resources.ResourceManagerfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunctionfinal RecipeTypeFunction -
Constructor Summary
ConstructorsConstructorDescriptionRecipesKubeEvent(ServerScriptManager manager, net.minecraft.server.packs.resources.ResourceManager resourceManager) -
Method Summary
Modifier and TypeMethodDescriptionaddRecipe(KubeRecipe r, boolean json) voidapplyChanges(Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> map) booleancontainsRecipe(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) intcountRecipes(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) custom(dev.latvian.mods.rhino.Context cx, com.google.gson.JsonObject json) voiddiscoverRecipes(RecipeManagerKJS recipeManager, Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> datapackRecipeMap) Collection<net.minecraft.resources.ResourceLocation> findRecipeIds(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) findRecipes(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) voidvoidforEachRecipe(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, Consumer<KubeRecipe> consumer) getRecipeFunction(@Nullable String id) voidhandleFailedRecipe(net.minecraft.resources.ResourceLocation id, com.google.gson.JsonElement json, Throwable ex) com.mojang.serialization.DataResult<KubeRecipe> parseJson(com.google.gson.JsonObject json, SourceLine sourceLine) voidpost(RecipeManagerKJS recipeManager, Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> datapackRecipeMap) voidvoidvoidprintExamples(String type) voidprintTypes(dev.latvian.mods.rhino.Context cx) recipeStream(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) voidremove(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) voidreplaceInput(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, ReplacementMatchInfo match, Object with) voidreplaceOutput(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, ReplacementMatchInfo match, Object with) voidstage(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, String stage) net.minecraft.resources.ResourceLocationtakeId(KubeRecipe recipe, String prefix, String ids) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.event.KubeEvent
afterPosted, cancel, cancel, defaultExitValue, exit, exit, getExitValueType, mapExitValue, success, success
-
Field Details
-
POST_SKIP_ERROR
-
CREATE_RECIPE_SKIP_ERROR
-
recipeSchemaStorage
-
registries
-
resourceManager
public final net.minecraft.server.packs.resources.ResourceManager resourceManager -
ops
-
originalRecipes
-
addedRecipes
-
removedRecipes
-
vanillaShaped
-
vanillaShapeless
-
shaped
-
shapeless
-
smelting
-
blasting
-
smoking
-
campfireCooking
-
stonecutting
-
smithing
-
smithingTrim
-
-
Constructor Details
-
RecipesKubeEvent
public RecipesKubeEvent(ServerScriptManager manager, net.minecraft.server.packs.resources.ResourceManager resourceManager)
-
-
Method Details
-
post
@HideFromJS public void post(RecipeManagerKJS recipeManager, Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> datapackRecipeMap) -
discoverRecipes
@HideFromJS public void discoverRecipes(RecipeManagerKJS recipeManager, Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> datapackRecipeMap) -
postEvent
@HideFromJS public void postEvent() -
applyChanges
@HideFromJS public void applyChanges(Map<net.minecraft.resources.ResourceLocation, com.google.gson.JsonElement> map) -
finishEvent
@HideFromJS public void finishEvent() -
handleFailedRecipe
@HideFromJS public void handleFailedRecipe(net.minecraft.resources.ResourceLocation id, com.google.gson.JsonElement json, Throwable ex) -
getRecipes
-
addRecipe
-
recipeStream
-
forEachRecipe
public void forEachRecipe(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, Consumer<KubeRecipe> consumer) -
countRecipes
-
containsRecipe
-
findRecipes
-
findRecipeIds
public Collection<net.minecraft.resources.ResourceLocation> findRecipeIds(dev.latvian.mods.rhino.Context cx, RecipeFilter filter) -
remove
-
replaceInput
public void replaceInput(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, ReplacementMatchInfo match, Object with) -
replaceOutput
public void replaceOutput(dev.latvian.mods.rhino.Context cx, RecipeFilter filter, ReplacementMatchInfo match, Object with) -
getRecipeFunction
-
custom
-
parseJson
@HideFromJS public com.mojang.serialization.DataResult<KubeRecipe> parseJson(com.google.gson.JsonObject json, SourceLine sourceLine) -
printTypes
public void printTypes(dev.latvian.mods.rhino.Context cx) -
printAllTypes
public void printAllTypes() -
printExamples
-
takeId
public net.minecraft.resources.ResourceLocation takeId(KubeRecipe recipe, String prefix, String ids) -
stage
-