public interface IRarmorData
This is not supposed to be implemented.
| Modifier and Type | Method and Description |
|---|---|
int |
extractEnergy(int energy,
boolean simulate)
Tries to make the Rarmor this data is bound to extract a certain amount of energy
|
java.util.List<java.lang.String> |
getActiveModulesForSlot(int slot)
Gets the identifier of the module for an item that is in the specified slot
|
net.minecraft.item.ItemStack |
getBoundStack()
Gets the stack that this data is bound to
|
java.util.List<ActiveRarmorModule> |
getCurrentModules()
Gets the list of currently loaded and actively ticking modules
|
boolean |
getDirty()
Gets if this data should be saved to memory next time a world save happens
|
int |
getEnergyStored()
Gets the amount of RF or Tesla that the Rarmor this data is bound has stored
|
ActiveRarmorModule |
getInstalledModuleWithId(java.lang.String moduleId)
Checks if a module with a given id is installed
|
int |
getMaxEnergyStored()
Gets the max amount of RF or Tesla that the Rarmor this data is bound can store
|
java.util.Map<java.lang.String,java.lang.Integer> |
getModuleIdsForSlots()
Gets a map of strings that corresponds to the id of the module loaded in the current slot.
|
net.minecraft.inventory.IInventory |
getModuleStacks()
Returns the inventory containing all of the modules that are currently inside the Rarmor
|
int |
getSelectedModule()
Gets the place in the list of current modules that the currently selected module is in
|
int |
getSlotForActiveModule(ActiveRarmorModule module)
Gets the slot a module's item is currently in.
|
int |
getTotalTickedTicks()
Gets the amount of ticks that this Rarmor data has existed for.
|
void |
installModule(net.minecraft.item.ItemStack stack,
net.minecraft.entity.Entity entity,
int slotIndex)
Installs a module.
|
void |
queueUpdate()
Queues an update.
|
void |
queueUpdate(boolean reloadTabs)
Queues an update.
|
void |
queueUpdate(boolean reloadTabs,
int moduleIdForConfirmation)
Queues an update.
|
void |
queueUpdate(boolean reloadTabs,
int moduleIdForConfirmation,
boolean override)
Queues an update.
|
void |
readFromNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
Reads this Data from NBT.
|
int |
receiveEnergy(int energy,
boolean simulate)
Tries to make the Rarmor this data is bound to receive a certain amount of energy
|
void |
selectModule(int i)
Selects a module.
|
void |
sendQueuedUpdate(net.minecraft.entity.player.EntityPlayer player)
Sends an update that is queued.
|
void |
setBoundStack(net.minecraft.item.ItemStack stack)
Sets the stack that this data is bound to
|
void |
setDirty()
Sets if this data should be saved to memory next time a world save happens.
|
void |
setDirty(boolean yes)
Sets if this data should be saved to memory next time a world save happens
|
void |
setEnergy(int energy)
Sets the amount of energy that this Rarmor has currently stored
|
void |
tick(net.minecraft.world.World world,
net.minecraft.entity.Entity entity,
boolean isWearingHat,
boolean isWearingChest,
boolean isWearingPants,
boolean isWearingShoes)
Ticks this data.
|
void |
uninstallModule(ActiveRarmorModule module,
net.minecraft.entity.Entity entity,
boolean drop)
Uninstalls a module.
|
void |
writeToNBT(net.minecraft.nbt.NBTTagCompound compound,
boolean sync)
Writes this Data to NBT.
|
java.util.List<ActiveRarmorModule> getCurrentModules()
java.util.Map<java.lang.String,java.lang.Integer> getModuleIdsForSlots()
net.minecraft.inventory.IInventory getModuleStacks()
int getSlotForActiveModule(ActiveRarmorModule module)
module - The modulejava.util.List<java.lang.String> getActiveModulesForSlot(int slot)
slot - The slotint getSelectedModule()
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 discvoid 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 discvoid selectModule(int i)
i - The place in the list of current modules of the module that should be selectednet.minecraft.item.ItemStack getBoundStack()
void setBoundStack(net.minecraft.item.ItemStack stack)
stack - The stackvoid sendQueuedUpdate(net.minecraft.entity.player.EntityPlayer player)
Do not call this, it is for internal use only. An update will be sent every tick as long as the Rarmor is in the player's inventory. To send updates yourself, use queueUpdate below.
player - The player to send the update tovoid uninstallModule(ActiveRarmorModule module, net.minecraft.entity.Entity entity, boolean drop)
module - The module to uninstallentity - The entity that is trying to uninstall the moduledrop - If the item should be removed from the slot and droppedvoid installModule(net.minecraft.item.ItemStack stack,
net.minecraft.entity.Entity entity,
int slotIndex)
stack - The stack the module's item is inentity - The entity that is trying to install the moduleslotIndex - The slot the module should be put invoid 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 shoesvoid queueUpdate()
void queueUpdate(boolean reloadTabs)
reloadTabs - If the tabs on the side should be reinitiated or notvoid queueUpdate(boolean reloadTabs,
int moduleIdForConfirmation)
reloadTabs - If the tabs on the side should be reinitiated or notmoduleIdForConfirmation - The module's id that is sent to and then back from the client to confirm
that the packet was received. Use a negative number if this shouldn't happen.void queueUpdate(boolean reloadTabs,
int moduleIdForConfirmation,
boolean override)
reloadTabs - If the tabs on the side should be reinitiated or notmoduleIdForConfirmation - The module's id that is sent to and then back from the client to confirm
that the packet was received. Use a negative number if this shouldn't happen.override - If this update should override a currently already queued one.
This is useful if reloadTabs or moduleIdForConfirmation is important.ActiveRarmorModule getInstalledModuleWithId(java.lang.String moduleId)
moduleId - The idint getTotalTickedTicks()
int getEnergyStored()
int getMaxEnergyStored()
int receiveEnergy(int energy,
boolean simulate)
energy - The amount of energy to receivesimulate - If this operation should actually happen or just be simulatedint extractEnergy(int energy,
boolean simulate)
energy - The amount of energy to extractsimulate - If this operation should actually happen or just be simulatedvoid setEnergy(int energy)
energy - The amount of energy this Rarmor should haveboolean getDirty()
void setDirty(boolean yes)
yes - If this should happen or notvoid setDirty()