Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-4152

MapView canvar renders every tick

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • Java 10, Spigot 1.12.2 and Spigot 1.13 (0b44fa0-49a2604)

    • CraftBukkit version git-Spigot-5695bca-53fccdf (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT)

      When creating a MapView using Bukkit API you can remove existing renders and add yours, you can then assign the MapView to a FILLED_MAP ItemStack using:

      >= 1.13

      MapView view = Bukkit.createMap(p.getWorld());
      ItemStack item = new ItemStack(Material.FILLED_MAP);
      MapMeta meta = (MapMeta) item.getItemMeta();
      meta.setMapId(view.getId());
      item.setItemMeta(meta);
      

      < 1.12

      MapView view = Bukkit.createMap(p.getWorld());
      ItemStack item = new ItemStack(Material.MAP);
      item.setDurability(view.getId());
      

      If you then give the Item to a player, or you place it in a ItemFrame, the Map will render every tick.

      Eg: You give the map to a player, as far as the player has the item somewhere in his inventory the map will continue rendering, it will only stop if the player drops the item.
      Video:  https://i.imgur.com/ybPAPOQ.gifv

      P.S. I'm kind of new on Maps, if this is the intended behavior then sorry, Google didn't help.
      P.P.S.

            Unassigned Unassigned
            HAlex Lorenzo Lapucci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: