1.17.x FAWE API Not Setting Air Blocks

Discussion in 'Spigot Plugin Development' started by maxmooregaming, Jul 2, 2021.

  1. Hi! I'm messing around with a plugin for a friend (they make videos) and I'm stuck because what it does is set the lava to rise every few seconds and it does that but as soon as it gets to the air layer it doesn't set the air blocks to lava unlike everywhere else... Would appreciate any help :D

    Code (Java):

    EditSession editSession = new EditSessionBuilder(new BukkitWorld(min.getWorld())).fastmode(true).limitUnlimited().build();

    CuboidRegion region = new CuboidRegion(BlockVector3.at(min.getX(), min.getY(), min.getZ()), BlockVector3.at(max.getX(), max.getY(), max.getZ()));

    Pattern pattern = new BaseBlock(BlockState.getFromInternalId(BlockID.LAVA));
    Mask mask = new ExistingBlockMask(editSession.getExtent());
    editSession.replaceBlocks(region, mask, pattern);


    I think something may be generally wrong with my code as it does seem quite laggy but then again not a super powerful server and it's 10,000 blocks or so every 10 seconds