Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-118264

Different repeating /tp behavior in Creative and Survival / Adventure modes via functions

XMLWordPrintable

    • Confirmed

      The bug

      Using the new 'function' feature of the 1.12 pre-releases, if you have a relative teleporting command continuously running via gameLoopFunction it can produce different results in Creative mode than it does in Survival or Adventure mode.

      Having the function be called by a repeating command block works correctly.

      How to reproduce

      1. Download the attached function swing.mcfunction and place it in the following directory of your world folder
        data/functions/custom
        
      2. Open the world
      3. Stand on a block higher than the blocks around you
      4. Use the following commands
        /scoreboard objectives add swing dummy
        /scoreboard players set @s swing 0
        /setblock ~10 ~-1 ~ sandstone
        /summon armor_stand ~5 ~3 ~ {NoGravity:1b,CustomName:"2"}
        
      5. Set the function as gameLoopFunction
        /gamerule gameLoopFunction custom:swing
        
      6. Switch to Survival mode
        /gamemode survival
        
      7. Cast a fishing rod and try to hit the armor stand
        → You are teleported in a straight line
      8. Reset the gameLoopFunction
        /gamerule gameLoopFunction -
        
      9. Place a repeating command block with the following command and active it
        function custom:swing
        
      10. Repeat steps 6 and 7
        → You properly "swing" now

            Unassigned Unassigned
            Abelix Ábel József Plangár
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: