Package appeng.api.implementations.items
Interface IMemoryCard
public interface IMemoryCard
Memory Card API
AE's Memory Card Item Class implements this interface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA tag that may be present on the memory card to show a color code for P2P frequencies or other purposes on the memory card model. -
Method Summary
Modifier and TypeMethodDescriptionAEColor[]getColorCode(net.minecraft.world.item.ItemStack is) This represent as 4x2 grid ofAEColorwithout transparent/fluix color.net.minecraft.nbt.CompoundTaggetData(net.minecraft.world.item.ItemStack is) getSettingsName(net.minecraft.world.item.ItemStack is) returns the settings name provided by a previous call to setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there was no previous call to setMemoryCardContents.voidnotifyUser(net.minecraft.world.entity.player.Player player, MemoryCardMessages msg) notify the user of a outcome related to the memory card.voidsetMemoryCardContents(net.minecraft.world.item.ItemStack is, String settingsName, net.minecraft.nbt.CompoundTag data) Configures the data stored on the memory card, the SettingsName, will be localized when displayed.
-
Field Details
-
NBT_COLOR_CODE
A tag that may be present on the memory card to show a color code for P2P frequencies or other purposes on the memory card model.- See Also:
-
-
Method Details
-
setMemoryCardContents
void setMemoryCardContents(net.minecraft.world.item.ItemStack is, String settingsName, net.minecraft.nbt.CompoundTag data) Configures the data stored on the memory card, the SettingsName, will be localized when displayed. The data can contain an optional string with the key "tooltip", which will be used as unlocalized string to display it after the settings name. The data can contain an optional intArray usingNBT_COLOR_CODEto be displayed on the model itself. It needs to have exactly 8 elements representing the ordinal of the matchingAEColor. The first 4 values represent the top row, left to right. The second 4 the bottom row.- Parameters:
is- itemsettingsName- unlocalized string that represents the block entity.data- the NBT tag, refer to the normal comment for special keys.
-
getSettingsName
returns the settings name provided by a previous call to setMemoryCardContents, or "AppEng.GuiITooltip.Blank" if there was no previous call to setMemoryCardContents.- Parameters:
is- item- Returns:
- setting name
-
getData
net.minecraft.nbt.CompoundTag getData(net.minecraft.world.item.ItemStack is) - Parameters:
is- item- Returns:
- the NBT Data previously saved by setMemoryCardContents, or an empty NBTCompound
-
getColorCode
This represent as 4x2 grid ofAEColorwithout transparent/fluix color. First 4 colors are used for the top row, second for the bottom one.- Parameters:
is- item- Returns:
- a hash representation of the memory card content
-
notifyUser
notify the user of a outcome related to the memory card.- Parameters:
player- that used the card.msg- which message to send.
-