Interface IMemoryCard


public interface IMemoryCard
Memory Card API AE's Memory Card Item Class implements this interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    getColorCode(net.minecraft.world.item.ItemStack is)
    This represent as 4x2 grid of AEColor without transparent/fluix color.
    net.minecraft.nbt.CompoundTag
    getData(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.
    void
    notifyUser(net.minecraft.world.entity.player.Player player, MemoryCardMessages msg)
    notify the user of a outcome related to the memory card.
    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.
  • Field Details

    • NBT_COLOR_CODE

      static final String 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 using NBT_COLOR_CODE to be displayed on the model itself. It needs to have exactly 8 elements representing the ordinal of the matching AEColor. The first 4 values represent the top row, left to right. The second 4 the bottom row.

      Parameters:
      is - item
      settingsName - unlocalized string that represents the block entity.
      data - the NBT tag, refer to the normal comment for special keys.
    • getSettingsName

      String 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.
      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

      AEColor[] getColorCode(net.minecraft.world.item.ItemStack is)
      This represent as 4x2 grid of AEColor without 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

      void notifyUser(net.minecraft.world.entity.player.Player player, MemoryCardMessages msg)
      notify the user of a outcome related to the memory card.
      Parameters:
      player - that used the card.
      msg - which message to send.