Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-61992

Functions break when making blocks while chunks are being generated

XMLWordPrintable

    • Community Consensus
    • Windows
    • 299593

      Instead of waiting for chunks to be generated, functions that attempt to teleport the player far away and create a structure where the player was just teleported to will instead generate nothing. For function files that require teleporting to operate, players may fall to their deaths while complex commands break easily from this.

      A workaround by using /tickingarea before placing structures has been found that helps mitigate this issue to an extent, but does not fix the underlying bug as it still happens if you use functions! Functions currently have no feature to pause execution after teleport to new chunks or a way to manage the rate at which functions are executed.

      Simply repasting a function is a naive option that works for some, but It can't always be done that way.

      For example, this should have sent players to the Nether at various locations in the world, but instead players fall to their deaths as none of it was generated properly. 

      spreadplayers 0 0 1000 8000 @a
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~ 254 ~ bedrock
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~1 255 ~ bedrock
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~-1 255 ~ bedrock
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~ 255 ~1 bedrock
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~ 255 ~-1 bedrock
      execute @a ~ ~ ~ /execute @s ~ ~ ~ /setblock ~ 255 ~ portal
      tp @a ~ 255 ~

      (Unfortunately for an Addon I'm making, this bug forced me to use squid clocks as a simple suffocation timer [18 seconds and annoying] to temporarily workaround this. I now use a special command to generate a portal on player if bedrock is detected at y=0, which requires effects to stop players from dying. All of which is too slow and cumbersome to deal with.)

            Cipheroid Tstu0001
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: