Closed plytki closed 2 years ago
No, currently not. There are ways to add this to the API. Are you interested in that?
Yes, I am very interested.
Could you also tell me if there is a chance to just paste the entities instead if the blocks with entities? Because when I paste the structure it is removing the area nearby. I know that there are air blocks so maybe you can just add option not to paste the blocks?
You can already ignore blocks if you return false for every block in onProcessBlock. The following code only loads the entities.
structureBlockLibApi
.loadStructure(plugin)
.at(player.getLocation())
.includeEntities(true)
.onProcessBlock(e -> {
return false;
})
.loadFromPath(plugin.getDataFolder().toPath().resolve(args[1]))
.onResult(e -> player.sendMessage("Placed structure."));
Implemented in version 2.7.0. See https://github.com/Shynixn/StructureBlockLib#load-entities-in-memory-and-iterate-them for details.
I need to add pasted entities to an ArrayList to handle them. Is there a way to do that with your API?