Movable airship to drive

  • 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 comminuty!

    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!

Status
Not open for further replies.

Ghostfish_

New Member
May 6, 2020
5
0
1
24
Hello, how to turn text into a block? I think I saved all blocks' name in text instead of alias, here is the example:

Code:
set block at {_workingLoc.%player%} to "stone" #won't work
set block at {_workingLoc.%player%} to stone #instead this will work

Is there any way to do it? Thanks

Oh by the way, how to copy the whole block information and paste in skript, I want to move the command block with the identical command
Tried worldedit and /clone, they work but they will pop up the useless messages to me.
Tried skript-mirror, here is the code:
Code:
import:
    org.bukkit.Location

command //m:
    trigger:
        set {_blockOld} to {locS1Java}.getBlock()
        set {_blockNew} to {locS2Java}.getBlock()
        {_blockNew}.setTypeIdAndData({_blockOld}.getTypeId(), {_blockOld}.getData(), true)
        set {_world} to player.getWorld()
        set {_tileEntityOld} to {_world}.getTileEntityAt({locS1Java}.getBlockX(), {locS1Java}.getBlockY(), {locS1Java}.getBlockZ())
        set {_tileEntityNew} to {_world}.getTileEntityAt({locS2Java}.getBlockX(), {locS2Java}.getBlockY(), {locS2Java}.getBlockZ())
        set {_we} to {_world}.getHandle()
        {_we}.setTileEntity({_tileEntityNew}.getPosition(), {_tileEntityOld})
This will work, but it can't delete the old command block. As soon as the old one got deleted, the new one lose the command it should carry

Other things emmm.....
the current algorithm is whether spawn falling blocks or delete and create blocks. Well, I think both of them are heavy for the server. need some advice (except stop doing the whole program) haha.

Thanks, guys!
 
Status
Not open for further replies.