Rotating World Schematic (Skript-Reflect)

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Steve2210

New Member
Aug 1, 2022
1
0
1
so i got a Snippet to Paste/Save FAWE Schematics but how i would rotate them?

Code:
import:
    com.sk89q.worldedit.bukkit.BukkitWorld
    com.sk89q.worldedit.extent.clipboard.Clipboard
    com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats
    com.sk89q.worldedit.math.BlockVector3
    com.sk89q.worldedit.regions.CuboidRegion
    java.io.File
    java.nio.file.Files
    java.nio.file.Paths


effect paste schematic %string% at %location% [(1¦(with|including) air)]:
    trigger:
        set {_file} to new File(expression-1)
        set {_location} to BlockVector3.at(expression-2.getBlockX(), expression-2.getBlockY(), expression-2.getBlockZ())
        set {_world} to new BukkitWorld(expression-2.getWorld())
        set {_includeAir} to true if parse mark = 1, else false
        ClipboardFormats.findByFile({_file}).load({_file}).paste({_world}, {_location}, false, {_includeAir}, false, null)


effect create schematic %string% from pos1 %location% pos2 %location% origin %location%:
    trigger:
        Files.deleteIfExists(Paths.get(expression-1))
        set {_file} to new File(expression-1)
        set {_pos1} to BlockVector3.at(expression-2.getBlockX(), expression-2.getBlockY(), expression-2.getBlockZ())
        set {_pos2} to BlockVector3.at(expression-3.getBlockX(), expression-3.getBlockY(), expression-3.getBlockZ())
        set {_origin} to BlockVector3.at(expression-4.getBlockX(), expression-4.getBlockY(), expression-4.getBlockZ())
        set {_world} to new BukkitWorld(expression-2.getWorld())
        set {_region} to new CuboidRegion({_world}, {_pos1}, {_pos2})
        set {_clipboard} to Clipboard.create({_region})
        {_clipboard}.setOrigin({_origin})
        {_clipboard}.save({_file}, ClipboardFormats.findByFile({_file}))