2

Tp command problem

Loupieur's Avatar Loupieur12/30/23 12:47 am history
2 emeralds 66
in a function when I sneak I make it tp ^ ^0.15 then at the bottom tp ~ ~-0.1 ~, except I don't know why in game it only tp me tp ~ ~-0.1 ~ and not ^ ^0.15, and if I reverse the 2 tp commands it tp me well ^ ^0.15 but not tp ~ ~-0. 1 ~, I don't know why I looked for it, I tested to see if the 2nd command of tp executed well and yes except that it doesn't tp me but the command works it's not logical, nothing to do with the conditions (if block, if entity etc...) of the command I put, if you want I put all the commands of the function :

function executed if predicate fun_items:others/mainhand/lightener then unless score @s sneak_detect matches 1... (conditions work) :
execute unless entity @e[type=minecraft:marker,tag=lightener_facing,distance=..1] run summon minecraft:marker ~ ~ ~ {Tags:["lightener_facing"]}
tp @e[type=minecraft:marker,tag=lightener_facing,distance=..1] ~ ~ ~ ~ 0
execute if block ~ ~-0.1 ~ #fun_items:traversable at @e[type=minecraft:marker,tag=lightener_facing,distance=..1] if block ^ ^ ^0.15 #fun_items:traversable run tp @s ^ ^ ^0.15
kill @e[type=minecraft:marker,tag=lightener_facing,distance=..1]
execute if block ~ ~-0.1 ~ #fun_items:traversable run tp @s ~ ~-0.1 ~
effect give @s minecraft:slow_falling 1 0 true
effect give @s minecraft:speed 1 5 true
effect give @s minecraft:jump_boost 1 5 true
effect give @s minecraft:dolphins_grace 1 2 true

when I have a certain item in either hand, I'm faster and lighter etc., and if I sneak, I'm supposed to be a little less light and a little further ahead (it makes me go straight ahead, if I look down a bit I'm not tp at the bottom but right in front) all by myself even without pressing the key to move forward (a bit like hanglider in the Minecraft Paladium server where you're faster but less light when you sneak with it) except that one of the 2 tp commands doesn't work depending on the order I put them in, yet the 2 tp commands aren't supposed to influence each other, plus when I test manually or with command blocks it works fine, but not in function, the 2 tp commands don't work together, but if I put a condition on just one of these commands, for example one that only works if you're not on a block, it'll work on you're not on a block and when you're on a block, the other tp command will work but not the one that was working (I don't think it's clear), it's not logicalnormally, if I tp myself in front and then I put tp underneath, it shouldn't t tp me back. I've even tried tests with command blocks with the same conditions or without conditions, with the effects I'm supposed to have or not, in the functions too, I also tested putting the tp commands in a single function all by themselves and it did the same, I also tried putting each tp command in a different function but still no, when I deactivated one tp command only the other worked. .. What's more, I can't find a solution to the problem anywhere. I tried setting Levitation level 250 to make us descend a little less slowly than Slow Falling, but it's not the same, if I already have a Levitation effect, if we already had a Levitation effect, it'll cancel itself out, or else it's the levitation effect I have that won't work if I already have levitation with a higher level, and on top of that levitation is buggy when you take damage it makes you jump in the air, and it doesn't make me go down the same way as with tp ~ ~-0. 1 ~ I can't be precise about the speed at which I'm falling, and it's not right that the 2 tp commands don't work at the same time...until I manage to fix the problem, I'm using the levitation effect and removing the command that tp us below for the time being
Posted by Loupieur's Avatar
Loupieur
Level 41 : Master Dragon
9

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome