public class Manual
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addProvider(ContentProvider provider)
Register a content provider.
|
static void |
addProvider(PathProvider provider)
Register a path provider.
|
static void |
addProvider(java.lang.String prefix,
ImageProvider provider)
Register an image provider.
|
static void |
addTab(TabIconRenderer renderer,
java.lang.String tooltip,
java.lang.String path)
Register a tab to be displayed next to the manual.
|
static java.lang.Iterable<java.lang.String> |
contentFor(java.lang.String path)
Get the content of the documentation page at the specified location.
|
static ImageRenderer |
imageFor(java.lang.String path)
Get the image renderer for the specified image path.
|
static void |
navigate(java.lang.String path)
Navigate to a page in the manual.
|
static void |
openFor(net.minecraft.entity.player.EntityPlayer player)
Open the manual for the specified player.
|
static java.lang.String |
pathFor(net.minecraft.item.ItemStack stack)
Look up the documentation path for the specified item stack.
|
static java.lang.String |
pathFor(net.minecraft.world.World world,
int x,
int y,
int z)
Look up the documentation for the specified block in the world.
|
static void |
reset()
Reset the history of the manual.
|
public static void addTab(TabIconRenderer renderer, java.lang.String tooltip, java.lang.String path)
renderer
- the renderer used to render the icon on your tab.tooltip
- the unlocalized tooltip of the tab, or null.path
- the path to the page to open when the tab is clicked.public static void addProvider(PathProvider provider)
provider
- the provider to register.public static void addProvider(ContentProvider provider)
provider
- the provider to register.public static void addProvider(java.lang.String prefix, ImageProvider provider)
prefix
- the prefix on which to use the provider.provider
- the provider to register.public static ImageRenderer imageFor(java.lang.String path)
ImageProvider
s registered for a prefix in the
specified path. If there is no match, or the matched content provider
does not provide a renderer, this will return null.path
- the path to the image to get the renderer for.public static java.lang.String pathFor(net.minecraft.item.ItemStack stack)
stack
- the stack to find the documentation path for.public static java.lang.String pathFor(net.minecraft.world.World world, int x, int y, int z)
world
- the world containing the block.x
- the X coordinate of the block.y
- the Y coordinate of the block.z
- the Z coordinate of the block.public static java.lang.Iterable<java.lang.String> contentFor(java.lang.String path)
path
- the path of the page to get the content of.public static void openFor(net.minecraft.entity.player.EntityPlayer player)
navigate(String)
after this function returns, with the path to the page to show.player
- the player to open the manual for.public static void reset()
public static void navigate(java.lang.String path)
path
- the path to navigate to.