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

Spawning item frame in air

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Windows 10 x64 bit

    • Spigot 1.16.5
    • Yes

      I am trying to spawn a frame in such a position that it doesn't have a reference block (in air), but instead it attaches to the nearest block. For example, if, when executing this code, the block is on the side, but there is no bottom of it, then the frame will attach to the block from the side, although I need the frame to be directed up

      face = BlockFace.UP;
      frame = loc.getWorld().spawn(loc, ItemFrame.class, Lframe -> {
          Lframe.setFacingDirection(face);
      });
      

      There are no errors in the console

      If you spawn a frame with a vanilla command, then it spawns without any problems even in the air. I could use the command executor on behalf of the console right in the code, but this a) spam console messages b) not the best and most convenient workaround

      I also tried, before spawning the frame, to replace the "empty" block on which the frame is located with a stone, and then after the frame spawns to return the old block back, but this creates a huge number of problems, such as problems with fluid, since when the old block is returned, a complete block of fluid, even if it was incomplete. In addition, it is very difficult to predict the behavior of all such blocks on which the frame cannot be spawned.

       

            Unassigned Unassigned
            RulleR Igor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: