Package guideme.siteexport
Interface ResourceExporter
@NonExtendable
public interface ResourceExporter
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCleanupCallback(Runnable runnable) Add a runnable to run when the export concludes to perform cleanup.voidaddExtraData(net.minecraft.resources.ResourceLocation key, Object value) Adds arbitrary data to be added to the exported guides index JSON file.copyResource(net.minecraft.resources.ResourceLocation id) exportTexture(net.minecraft.resources.ResourceLocation texture) Exports a texture by id and returns the relative path to refer to it from other content that is being exported.@Nullable net.minecraft.resources.ResourceLocationgetPageSpecificPathForWriting(String suffix) Generates a resource location for a page specific resource.net.minecraft.resources.ResourceLocationGenerates a resource location for a page specific resource.getPathForWriting(net.minecraft.resources.ResourceLocation assetId) default StringvoidreferenceFluid(net.minecraft.world.level.material.Fluid fluid) Ensures the data needed to show tooltips or icons for this fluid is exported.voidreferenceIngredient(net.minecraft.world.item.crafting.Ingredient ingredient) Ensures the data needed to show tooltips or icons for the items in this ingredient is exported.voidreferenceItem(net.minecraft.world.item.ItemStack stack) Ensures the data needed to show tooltips or icons for this item is exported.default voidreferenceItem(net.minecraft.world.level.ItemLike item) Ensures the data needed to show tooltips or icons for this item is exported.voidreferenceRecipe(net.minecraft.world.item.crafting.RecipeHolder<?> recipe) Ensures that the data needed to show the given recipe, its ingredients and its output is exported.voidreferenceSlotDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display) Ensures the data needed to show tooltips or icons for the items in this slot display is exported.
- 
Method Details- 
referenceItemdefault void referenceItem(net.minecraft.world.level.ItemLike item) Ensures the data needed to show tooltips or icons for this item is exported.
- 
referenceItemvoid referenceItem(net.minecraft.world.item.ItemStack stack) Ensures the data needed to show tooltips or icons for this item is exported.
- 
referenceFluidvoid referenceFluid(net.minecraft.world.level.material.Fluid fluid) Ensures the data needed to show tooltips or icons for this fluid is exported.
- 
referenceSlotDisplayvoid referenceSlotDisplay(net.minecraft.world.item.crafting.display.SlotDisplay display) Ensures the data needed to show tooltips or icons for the items in this slot display is exported.
- 
referenceIngredientvoid referenceIngredient(net.minecraft.world.item.crafting.Ingredient ingredient) Ensures the data needed to show tooltips or icons for the items in this ingredient is exported.
- 
exportTextureExports a texture by id and returns the relative path to refer to it from other content that is being exported.
- 
copyResource- Returns:
- The new resource id after applying cache busting.
 
- 
getPathForWriting
- 
getPageSpecificPathForWritingGenerates a resource location for a page specific resource.
- 
getCurrentPageId@Nullable @Nullable net.minecraft.resources.ResourceLocation getCurrentPageId()
- 
getOutputFolderPath getOutputFolder()
- 
getPathRelativeFromOutputFolder
- 
getPageSpecificResourceLocationGenerates a resource location for a page specific resource.
- 
referenceRecipevoid referenceRecipe(net.minecraft.world.item.crafting.RecipeHolder<?> recipe) Ensures that the data needed to show the given recipe, its ingredients and its output is exported.- See Also:
 
- 
addExtraDataAdds arbitrary data to be added to the exported guides index JSON file.- Parameters:
- key- The key under which the data will be retrievable.
- value- The value to be serialized to JSON using GSON.
 
- 
addCleanupCallbackAdd a runnable to run when the export concludes to perform cleanup.
 
-