EpicBanItemTeam / VirtualChest

A sponge plugin providing virtual chest GUIs for menus like ChestCommands
https://ore.spongepowered.org/zzzz/VirtualChest
GNU Lesser General Public License v3.0
34 stars 12 forks source link

Suggestion : Item Flicker #121

Closed MageFX closed 3 years ago

MageFX commented 3 years ago

Would it be possible to add a feature where 2 ItemTypes can be used on the same Slot but switch between each couple of seconds to show a highlight effect?

Example

  Slot11 {
    Item {
      Count = 1
      ItemType = "minecraft:stone"
      UnsafeDamage = 0
      Count2 = 1
      ItemType2 = "minecraft:cobblestone"
      UnsafeDamage2 = 0
      DisplayName = "Example Name"
      ItemLore = [
          "Example Lore"
          ]
    }
  }
ustc-zzzz commented 3 years ago

tick is available as a global variable in Requirements, which means how many ticks have been passed since you opened the menu. Here is an example:

Slot0 = [{
    # white pane
    Item { ItemType = "minecraft:stained_glass_pane", Count = 1, UnsafeDamage = 0 }
    Requirements = "tick % 20 < 10"
}, {
    # black pane
    Item { ItemType = "minecraft:stained_glass_pane", Count = 1, UnsafeDamage = 15 }
    Requirements = "tick % 20 >= 10"
}]