Getting schematic data

Discussion in 'Plugin Development' started by BrunoRM, Jun 28, 2021.

Thread Status:
Not open for further replies.
  1. Offline

    BrunoRM

    Hello, I'm trying to get data from a schematic. Specifically, I'm trying to get the TileEntities list.

    This is what I'm doing:
    I'm getting the child tag TileEntities from the schematic
    Code:
    List<Tag> tileEntities = getChildTag(schematic, "TileEntities", ListTag.class).getValue();
    And when pasting the schematic, I get the same list
    Code:
    List<Tag> tileEntities = schematic.getTileEntities();
    The problem that I have is:
    When I get the data and I print it in the console:
    Code:
            for(Tag tag : tileEntities) {
                System.out.println(tag.getValue());
            }
    
    I get this:
    Code:
    {x=TAG_Int("x"): 1, Text4=TAG_String("Text4"): "", y=TAG_Int("y"): 0, Text3=TAG_String("Text3"): "", z=TAG_Int("z"): 1, Text2=TAG_String("Text2"): "", id=TAG_String("id"): Sign, Text1=TAG_String("Text1"): ""}
    In my case, the schematic only has a sign (for testing purposes).

    How can I use those values to put them on (in this case) the sign(s)?
    Thanks!
     
Thread Status:
Not open for further replies.

Share This Page