Sorry to bother you, this was my first post, and after testing using the method I mentioned, I couldn't recreate the problem myself either.
But thanks to you I now know that I should have been a bit more specific.
I'm trying to build a parkour map in vanilla Minecraft with a "few extra skills", one of them being able to swing across gaps using your fishing rod.
It works like this: when you cast the lure near and End rod (where there's actually an invisible armorstand floating custom named "2" or "4" [respectively for X and Z axis swinging]), your score in the "swing" dummy crietria gets updated, and as the score's ticking upwards, first you get teleported into position, then after falling briefly you start teleporting rapidly but relatively forward (this was the troublesome part) while also gaining a levitation effect.
This makes it look like you're actually swinging via the fishing rods rope.
I'm running these commands via a function, and when I do this, I get different results in Creative and Adventure mode.
Since you were so kind to help me out before, could I bother you a bit more? If you could, I will include the exact steps for reproducing my problem in my next reply. But if you don't want to, it's not that big of a tragedy.
Yes, thank you very much, you are correct.
I'll provide now the whole scenario during which I ran into this peculiar presence.
1, Create a new world or load an existing one, and then, in the game's folder, saves>yourworld>data>functions create a map and in it a .mcfunction file. You can call them whatever you want, I called them "main" and "swing.mcfunction".
2, After that, copy and paste all the commands that I'll provide at the end of this message into that function file (sorry, I tried attaching the file itself, but it didn't work).
3, Then, while in game, add a dummy type scoreboard objective into the game, called swing, and also set your own score in to to 0.
/scoreboard objectives add swing dummy
/scoreboard players set @p swing 0
4, After reloading functions, if necessary ( /reload ), start running the function with gameLoopFunction.
/gamerule gameLoopFunction main:swing
5, Build a basic platform from which the "swinging" can take place.
Put at least one block which you can stand on 3 blocks above ground level. Then, in a horizontal direction, leaving a 9 block gap out, place another block.
In between these blocks, right in the middle, and another 3 blocks higher in the air, place an armor stand that is not affected by gravity, and which's custom name is either "2", if you want to swing along the X axis, or "4", if you want to swing along the Z axis.
/summon armor_stand ~ ~ ~
{NoGravity:1,CustomName:"2"}
(In my map, they are invisible, and are placed right into End Rods. It gives the player the feeling they are swinging on the rods.)
6, Now just stand on either side of the swing on one of the blocks, hold a fishing rod in your hand, and cast the bobber so that it attaches itself to the armor stand (make sure you play the game in english language, because the bobber is only called "unknown" in the english version).
If you did everything right, during the next few seconds you should be "swinging through the gap" during a little command controlled sequence.
And my original 'bug' comes from the particular swinging animation not working properly outside Creative mode. In Creative, you swing across the gap with a little arc, first going slightly down and then back up, like I want it to happen. But in Adventure mode, as soon as you start "moving forward during the swing" (I made this happen via constant tp-ing) you start moving forward in a straight line, unaffected by gravity, instead of going in an arc.
I know it's a long list, I tried to be as precise as I could, but if you still miss something, let me now.
And now I'll copy-paste the commands here that you will have to copy-paste into the function file:
So you think that the probem is caused by functions having a slightly different behavior than command blocks do, and that combining the two methods together might solve it.
Even though I wanted to completely exclude command blocks from my map, since they have to be in loaded chuncks to work and in great numbers they can make the game more laggy, maybe they could still work. Since these "swinging points" will be usable only in specific places anyways, unlike some other futures, like double jumping and wall jumping, maybe moving the 'tp' part from the function into a nearby repeating command block could really solve the problem without causing further trouble.
Thank you for the tip, and also for taking the time to help me out. I'll try out this new method soon. Hope it'll work.
Sorry to bother you, this was my first post, and after testing using the method I mentioned, I couldn't recreate the problem myself either.
But thanks to you I now know that I should have been a bit more specific.
I'm trying to build a parkour map in vanilla Minecraft with a "few extra skills", one of them being able to swing across gaps using your fishing rod.
It works like this: when you cast the lure near and End rod (where there's actually an invisible armorstand floating custom named "2" or "4" [respectively for X and Z axis swinging]), your score in the "swing" dummy crietria gets updated, and as the score's ticking upwards, first you get teleported into position, then after falling briefly you start teleporting rapidly but relatively forward (this was the troublesome part) while also gaining a levitation effect.
This makes it look like you're actually swinging via the fishing rods rope.
I'm running these commands via a function, and when I do this, I get different results in Creative and Adventure mode.
Since you were so kind to help me out before, could I bother you a bit more? If you could, I will include the exact steps for reproducing my problem in my next reply. But if you don't want to, it's not that big of a tragedy.
Yes, thank you very much, you are correct.
I'll provide now the whole scenario during which I ran into this peculiar presence.
1, Create a new world or load an existing one, and then, in the game's folder, saves>yourworld>data>functions create a map and in it a .mcfunction file. You can call them whatever you want, I called them "main" and "swing.mcfunction".
2, After that, copy and paste all the commands that I'll provide at the end of this message into that function file (sorry, I tried attaching the file itself, but it didn't work).
3, Then, while in game, add a dummy type scoreboard objective into the game, called swing, and also set your own score in to to 0.
/scoreboard objectives add swing dummy
/scoreboard players set @p swing 0
4, After reloading functions, if necessary ( /reload ), start running the function with gameLoopFunction.
/gamerule gameLoopFunction main:swing
5, Build a basic platform from which the "swinging" can take place.
{NoGravity:1,CustomName:"2"}Put at least one block which you can stand on 3 blocks above ground level. Then, in a horizontal direction, leaving a 9 block gap out, place another block.
In between these blocks, right in the middle, and another 3 blocks higher in the air, place an armor stand that is not affected by gravity, and which's custom name is either "2", if you want to swing along the X axis, or "4", if you want to swing along the Z axis.
/summon armor_stand ~ ~ ~
(In my map, they are invisible, and are placed right into End Rods. It gives the player the feeling they are swinging on the rods.)
6, Now just stand on either side of the swing on one of the blocks, hold a fishing rod in your hand, and cast the bobber so that it attaches itself to the armor stand (make sure you play the game in english language, because the bobber is only called "unknown" in the english version).
If you did everything right, during the next few seconds you should be "swinging through the gap" during a little command controlled sequence.
And my original 'bug' comes from the particular swinging animation not working properly outside Creative mode. In Creative, you swing across the gap with a little arc, first going slightly down and then back up, like I want it to happen. But in Adventure mode, as soon as you start "moving forward during the swing" (I made this happen via constant tp-ing) you start moving forward in a straight line, unaffected by gravity, instead of going in an arc.
I know it's a long list, I tried to be as precise as I could, but if you still miss something, let me now.
And now I'll copy-paste the commands here that you will have to copy-paste into the function file:
execute @e[name=unknown] ~ ~ ~ /execute @e[r=2,name=2] ~2 ~-4 ~-6 /execute @p[dx=5,dy=8,dz=12] ~ ~ ~ /scoreboard players set @p[score_swing=0] swing 1
execute @e[name=unknown] ~ ~ ~ /execute @e[r=2,name=2] ~-7 ~-4 ~-6 /execute @p[dx=5,dy=8,dz=12] ~ ~ ~ /scoreboard players set @p[score_swing=0] swing 41
execute @e[name=unknown] ~ ~ ~ /execute @e[r=2,name=4] ~-6 ~-4 ~-7 /execute @p[dx=12,dy=8,dz=5] ~ ~ ~ /scoreboard players set @p[score_swing=0] swing 81
execute @e[name=unknown] ~ ~ ~ /execute @e[r=2,name=4] ~-6 ~-4 ~2 /execute @p[dx=12,dy=8,dz=5] ~ ~ ~ /scoreboard players set @p[score_swing=0] swing 121
scoreboard players add @p[score_swing_min=1] swing 1
execute @e[name=unknown] ~ ~ ~ /execute @e[name=2,r=2] ~4 ~ ~ /teleport @p[score_swing_min=2,score_swing=2] ~ ~ ~ ~ ~
effect @p[score_swing_min=10,score_swing=11] levitation 1 6 true
tp @p[score_swing_min=10,score_swing=30] ~-0.46 ~ ~
execute @p[score_swing_min=32,score_swing=33] ~ ~ ~ /kill @e[name=unknown]
scoreboard players set @p[score_swing_min=34,score_swing=36] swing 0
execute @e[name=unknown] ~ ~ ~ /execute @e[name=2,r=2] ~-4 ~ ~ /teleport @p[score_swing_min=42,score_swing=42] ~ ~ ~ ~ ~
effect @p[score_swing_min=50,score_swing=51] levitation 1 6 true
tp @p[score_swing_min=50,score_swing=70] ~0.46 ~ ~
execute @p[score_swing_min=72,score_swing=73] ~ ~ ~ /kill @e[name=unknown]
scoreboard players set @p[score_swing_min=74,score_swing=76] swing 0
execute @e[name=unknown] ~ ~ ~ /execute @e[name=4,r=2] ~ ~ ~-4 /teleport @p[score_swing_min=82,score_swing=82] ~ ~ ~ ~ ~
effect @p[score_swing_min=90,score_swing=91] levitation 1 6 true
tp @p[score_swing_min=90,score_swing=110] ~ ~ ~0.46
execute @p[score_swing_min=112,score_swing=113] ~ ~ ~ /kill @e[name=unknown]
scoreboard players set @p[score_swing_min=114,score_swing=116] swing 0
execute @e[name=unknown] ~ ~ ~ /execute @e[name=4,r=2] ~ ~ ~4 /teleport @p[score_swing_min=122,score_swing=122] ~ ~ ~ ~ ~
effect @p[score_swing_min=130,score_swing=131] levitation 1 6 true
tp @p[score_swing_min=130,score_swing=150] ~ ~ ~-0.46
execute @p[score_swing_min=152,score_swing=153] ~ ~ ~ /kill @e[name=unknown]
scoreboard players set @p[score_swing_min=154,score_swing=156] swing 0
So you think that the probem is caused by functions having a slightly different behavior than command blocks do, and that combining the two methods together might solve it.
Even though I wanted to completely exclude command blocks from my map, since they have to be in loaded chuncks to work and in great numbers they can make the game more laggy, maybe they could still work. Since these "swinging points" will be usable only in specific places anyways, unlike some other futures, like double jumping and wall jumping, maybe moving the 'tp' part from the function into a nearby repeating command block could really solve the problem without causing further trouble.
Thank you for the tip, and also for taking the time to help me out. I'll try out this new method soon. Hope it'll work.