public abstract class ActiveRarmorModule
extends java.lang.Object
Extend this to make a custom module. The class then has to be registered using the RarmorAPI.registerRarmorModule method.
| Modifier and Type | Field and Description |
|---|---|
IRarmorData |
data |
boolean |
invalid
If this module is invalid.
|
| Constructor and Description |
|---|
ActiveRarmorModule(IRarmorData data) |
| Modifier and Type | Method and Description |
|---|---|
abstract RarmorModuleContainer |
createContainer(net.minecraft.entity.player.EntityPlayer player,
net.minecraft.inventory.Container container)
Creates a new container when opening this' tab.
|
abstract RarmorModuleGui |
createGui(net.minecraft.client.gui.inventory.GuiContainer gui)
Creates a new GUI when opening this' tab.
|
boolean |
doesRenderOnOverlay(net.minecraft.client.Minecraft mc,
net.minecraft.entity.player.EntityPlayer player,
IRarmorData data)
Gets if this module should appear on the overlay on the top left of the screen
|
boolean |
equals(java.lang.Object o) |
abstract net.minecraft.item.ItemStack |
getDisplayIcon()
Gets the icon that is displayed in the overlay on the top left of the screen
and the tab on the right side of the Rarmor.
|
abstract java.lang.String |
getIdentifier()
Gets the identifier of this module.
|
abstract boolean |
hasTab(net.minecraft.entity.player.EntityPlayer player)
Gets if this module should have an openable tab on the side of the Rarmor.
|
abstract void |
onInstalled(net.minecraft.entity.Entity entity)
Called when this module is installed into a Rarmor
|
abstract void |
onUninstalled(net.minecraft.entity.Entity entity)
Called when this module is uninstalled from a Rarmor
|
abstract void |
readFromNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
Reads this module from NBT.
|
abstract void |
renderAdditionalOverlay(net.minecraft.client.Minecraft mc,
net.minecraft.entity.player.EntityPlayer player,
IRarmorData data,
net.minecraft.client.gui.ScaledResolution resolution,
int renderX,
int renderY,
float partialTicks)
This can be used to render additional information to the overlay displayed on the top left of the screen
|
abstract void |
tick(net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
boolean isWearingHat,
boolean isWearingChest,
boolean isWearingPants,
boolean isWearingShoes)
Ticks this module.
|
abstract void |
writeToNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
Writes this module to NBT.
|
public final IRarmorData data
public boolean invalid
public ActiveRarmorModule(IRarmorData data)
public abstract java.lang.String getIdentifier()
public abstract void readFromNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
compound - The compound of NBT to read fromsync - If this is for syncing or for saving to discpublic abstract void writeToNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
compound - The compound of NBT to write tosync - If this is for syncing or for saving to discpublic abstract RarmorModuleContainer createContainer(net.minecraft.entity.player.EntityPlayer player, net.minecraft.inventory.Container container)
player - The player that is opening the tabcontainer - The base Rarmor container the tab is opened onpublic abstract RarmorModuleGui createGui(net.minecraft.client.gui.inventory.GuiContainer gui)
gui - The base Rarmor GUI the tab is opened onpublic abstract void onInstalled(net.minecraft.entity.Entity entity)
entity - The entity that is installing thispublic abstract void onUninstalled(net.minecraft.entity.Entity entity)
entity - The entity that is uninstalling thispublic abstract boolean hasTab(net.minecraft.entity.player.EntityPlayer player)
player - The player that is trying to have a tabpublic abstract net.minecraft.item.ItemStack getDisplayIcon()
Don't just return a new ItemStack here, as this is being called every tick and would produce unnecessary memory usage.
public final boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic abstract void tick(net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
boolean isWearingHat,
boolean isWearingChest,
boolean isWearingPants,
boolean isWearingShoes)
world - The worldentity - The entityisWearingHat - If the entity is currently wearing the Rarmor hatisWearingChest - If the entity is currently wearing the Rarmor chestpalteisWearingPants - If the entity is currently wearing the Rarmor pantsisWearingShoes - If the entity is currently wearing the Rarmor shoespublic abstract void renderAdditionalOverlay(net.minecraft.client.Minecraft mc,
net.minecraft.entity.player.EntityPlayer player,
IRarmorData data,
net.minecraft.client.gui.ScaledResolution resolution,
int renderX,
int renderY,
float partialTicks)
mc - The Minecraft instanceplayer - The player that is wearing the Rarmordata - The data (same as this' data variable)resolution - The current resolutionrenderX - The x position to render this module atrenderY - The y position to render this module atpartialTicks - The amount of partial tickspublic boolean doesRenderOnOverlay(net.minecraft.client.Minecraft mc,
net.minecraft.entity.player.EntityPlayer player,
IRarmorData data)
mc - The Minecraft instanceplayer - The player that is wearing the Rarmordata - The data (same as this' data variable)