Mojira Archive
MC-118264

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

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

Awaiting Response

Ábel József Plangár

2017-06-04, 09:48 PM

2018-12-08, 03:23 PM

2018-12-08, 03:23 PM

1

1

Confirmed

/gamerule, /teleport, /tp, function, gameLoopFunction, gamemode

Minecraft 1.12 Pre-Release 7

-