public abstract class CategoryAbstract
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> |
entries |
java.lang.String |
name |
| Constructor and Description |
|---|
CategoryAbstract(java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> entries,
java.lang.String name) |
CategoryAbstract(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEntries(java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> entries) |
void |
addEntry(net.minecraft.util.ResourceLocation key,
EntryAbstract entry)
Adds an entry to this category.
|
void |
addEntry(java.lang.String key,
EntryAbstract entry)
Adds an entry to this category.
|
abstract boolean |
canSee(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack bookStack) |
abstract void |
draw(Book book,
int categoryX,
int categoryY,
int categoryWidth,
int categoryHeight,
int mouseX,
int mouseY,
GuiBase guiBase,
boolean drawOnLeft,
net.minecraft.client.renderer.RenderItem renderItem) |
abstract void |
drawExtras(Book book,
int categoryX,
int categoryY,
int categoryWidth,
int categoryHeight,
int mouseX,
int mouseY,
GuiBase guiBase,
boolean drawOnLeft,
net.minecraft.client.renderer.RenderItem renderItem) |
boolean |
equals(java.lang.Object o) |
EntryAbstract |
getEntry(net.minecraft.util.ResourceLocation key)
Obtains an entry from this category.
|
EntryAbstract |
getEntry(java.lang.String key)
Obtains an entry from this category.
|
java.lang.String |
getLocalizedName()
Obtains a localized copy of this category's name.
|
java.util.List<java.lang.String> |
getTooltip() |
int |
hashCode() |
abstract void |
onInit(Book book,
GuiHome guiHome,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack bookStack) |
abstract void |
onLeftClicked(Book book,
int mouseX,
int mouseY,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack bookStack) |
abstract void |
onRightClicked(Book book,
int mouseX,
int mouseY,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack bookStack) |
void |
removeEntries(java.util.List<net.minecraft.util.ResourceLocation> keys) |
void |
removeEntry(net.minecraft.util.ResourceLocation key) |
CategoryAbstract |
withKeyBase(java.lang.String keyBase)
Sets the domain to use for all ResourceLocation keys passed through
getEntry(String) and
addEntry(String, EntryAbstract)
Required in order to use those. |
public final java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> entries
public final java.lang.String name
public CategoryAbstract(java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> entries, java.lang.String name)
public CategoryAbstract(java.lang.String name)
public void addEntry(net.minecraft.util.ResourceLocation key,
EntryAbstract entry)
key - - The key of the entry to add.entry - - The entry to add.public void addEntry(java.lang.String key,
EntryAbstract entry)
addEntry(ResourceLocation, EntryAbstract). Requires withKeyBase(String) to have been called.key - - The key of the entry to add.entry - - The entry to add.public void removeEntry(net.minecraft.util.ResourceLocation key)
public void addEntries(java.util.Map<net.minecraft.util.ResourceLocation,EntryAbstract> entries)
public void removeEntries(java.util.List<net.minecraft.util.ResourceLocation> keys)
public EntryAbstract getEntry(net.minecraft.util.ResourceLocation key)
key - - The key of the entry to obtain.public EntryAbstract getEntry(java.lang.String key)
getEntry(ResourceLocation). Requires withKeyBase(String) to have been called.
This can be null, however it is not marked as nullable to avoid annoying IDE warnings. I am making the
assumption that this will only be called while creating the book and thus the caller knows it exists.
If you are calling at any other time, make sure to nullcheck this.key - - The key of the entry to obtain.public CategoryAbstract withKeyBase(java.lang.String keyBase)
getEntry(String) and
addEntry(String, EntryAbstract)
Required in order to use those.keyBase - - The base domain for this entry.public java.lang.String getLocalizedName()
public java.util.List<java.lang.String> getTooltip()
public abstract void draw(Book book, int categoryX, int categoryY, int categoryWidth, int categoryHeight, int mouseX, int mouseY, GuiBase guiBase, boolean drawOnLeft, net.minecraft.client.renderer.RenderItem renderItem)
public abstract void drawExtras(Book book, int categoryX, int categoryY, int categoryWidth, int categoryHeight, int mouseX, int mouseY, GuiBase guiBase, boolean drawOnLeft, net.minecraft.client.renderer.RenderItem renderItem)
public abstract boolean canSee(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.item.ItemStack bookStack)
public abstract void onLeftClicked(Book book, int mouseX, int mouseY, net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack bookStack)
public abstract void onRightClicked(Book book, int mouseX, int mouseY, net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack bookStack)
public abstract void onInit(Book book, GuiHome guiHome, net.minecraft.entity.player.EntityPlayer player, net.minecraft.item.ItemStack bookStack)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object