Setting Portal Blocks

Discussion in 'Plugin Development' started by Ziden, Jan 29, 2016.

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

    Ziden

    In WorldEdit, if you do a //fast then //set portal you can set portals in the air.

    If i simply do a .setType(Material.PORTAL) it wont work. Does anyone know how can i do those portals in air ?

    Thanks for the attention !
     
  2. Offline

    Xerox262

    Check a physics event, check if it's a portal and if it is then cancel it. It should also let you manually place them with your hands after this too.
     
  3. Offline

    Zombie_Striker

    @Ziden
    If I remember correctly, Portal blocks have to be surrounded by either obsidian or other portal blocks in order for the portal block to stay a portal block. You would need to go into BlockUpdateEvent and cancel any events for that one portal block for it to stay.
     
  4. Offline

    Xerox262

    @Zombie_Striker BlockUpdateEvent? You mean BlockPhysicsEvent? Also you are remembering correctly, for portals to be active/stay they have to be a block in a pattern of
    Code:
    ####
    #PP#
    #PP#
    #PP#
    ####
    Where P is a portal and # is Obsidian
     
    Zombie_Striker likes this.
Thread Status:
Not open for further replies.

Share This Page