Teleportation spells allow you to pass through blocks
Ferocimo opened this issue ยท 25 comments
Hello,
Teleportation spells, like blink, allow you to pass through blocks, under certain circumstances.
For instance, it can allow a player to teleport on top of this structure, when he is underneath it :
http://www.noelshack.com/2018-48-2-1543352769-2018-11-27-22-04-44.png
You have to aim precisely at the angle.
This is a big concern on PVP servers where this can allow a player to enter other player's bases.
The issue is still there even with your modification ; however in light of what you said, you might want to try it not only with our config, but with this set as the "default spell" :
https://hastebin.com/ikudedahek.cpp
(this is from the spells.default.yml)
I'm standing at the bottom of the wall, on the wood (on my screenshot).
With our current config you can't, in any way, pass through a plain wall with Blink. The only way is doing this specific setup, shown on the screenshot.
Do you have something like example: ""
or load_default_spells: false
in your config.yml? In other words have you turned off the default configs some how?
Ah, ok, roger that... well then forget everything I said ๐
While I have your attention, what version are you on?
I'll try your configs again without the defaults this time.
Well sadly I'm having a lot of trouble reproducing the effect with your configs- I'm using the "defaults" one you pasted but it should be identical anyway since there's nothing else getting added.
Here's my setup and attempts:
https://gfycat.com/EmptyPlasticAplomadofalcon
From the description of your more recent post, one thing you could try is changing these two parameters in the base blink spell:
vertical_range: 0
ledge_range: 0
Though I would really like to know what the root cause is. Without passthrough enabled those should only let you get up on ledges when you have line of sight to the top of it, such as in the video when I intentionally teleported up to the ledge.
blink|6:
parameters:
safe: false
cooldown: 30000
costs:
mana: 150
It's written in the first pastebin I sent !
And yes, as I said previously :
Obviously this only happens if safe is set to false (so in blink|6, in my config).
So this is a requirement.
Strange that it does not show in the spells.defaults.yml you pasted then
blink|5:
upgrade_required_path: sorcier
upgrade_required_casts: 400
parameters:
allow_passthrough: false
range: 32
cooldown: 32000
costs:
mana: 140
enabled: true
blink|6:
parameters:
allow_passthrough: false
cooldown: 30000
costs:
mana: 150
enabled: true
But that is a good lead anyway, should hopefully be fixable.
Yes since the spells.defaults.yml is theorically not used it is not exactly the same as the version we have in the spells.yml.
That's good news ! Let me know if you find a fix.
Give this build a try when you can, please:
http://jenkins.elmakers.com/job/MagicPlugin/2823/com.elmakers.mine.bukkit.plugins$Magic/
You will probably need to disable blink if that's a big concern for you. Lower-level blink is meant to avoid this, but it levels up in ways that allow it to intentionally pass through walls.
I will leave this open because it does sound like you've found a bug, but I'm not sure how quickly it will get fixed so your best bet is to disable that spell for now.
Actually I forgot to mention I edited the spell a bit.
Here is the config :
https://pastebin.com/HFcdcbc0
I completely removed any possibility to pass through walls, technically.
Oh, ok, good catch!
Well it does have code that's meant to prevent players from sliding through diagonals and other tricky things but it seems like something is broken there. If it's a concern I would disable it to be safe, and if I'm ever able to reproduce and fix the issue I'll come back and let you know here.
I managed to track exactly how to reproduce the issue 100% of the time. It doesn't even has to involve "thin angles", the setup just needs to be something like that :
http://www.noelshack.com/2018-48-2-1543355526-2018-11-27-22-51-44.png
If you're on the ground and you aim on the blue block, you will appear on top of the structure. I only put that block in blue but that's actually the whole line : aim one block below the last block of the wall before the ceiling, and you will appear on top of the ceiling.
Gathering more data :
http://www.noelshack.com/2018-48-2-1543355969-2018-11-27-22-59-17.png
This bug allows players to appear on top of the andesite ceiling, but only if it is less than 5 blocks of width like on the left part (green line). If the ceiling is six blocks or more like on the right part (red line), the bug will not occur.
Obviously this only happens if safe is set to false (so in blink|6, in my config).
I tried that out but couldn't reproduce- where are you standing?
Now here's a thing though, I couldn't reproduce with Blink level 1- but I could reproduce the problem with Blink level 6, including with your customizations.
So now may be a good time to ask, are you still loading the "survival" example?
If so it's important to know that your changes are basically layered on top of the default survival configs, they don't outright replace them.
So for instance if you want to change the range of blink all you really need in your configs is like
blink:
parameters:
range: 32
You normally don't want to copy the whole thing unless you're planning on going full-custom, in which case you probably don't want to continue to load the survival configs at all, but rather copy all of the spell files and then customize. This isn't super recommended since you won't get updates anymore, but it is easier for some people to manage, since you don't have to worry about what's getting added on underneath your configs.
Sooooooo that all said, when you edited blink and just removed lines from the upgrades like "allow_passthrough: true" you didn't turn off passthrough, since it will still pull that line from the default configs. You can see this in effect, you don't actually need any of these squirrely mechanics- just walk straight up to a wall and blink through it! That's the intentional passthrough feature working.
I think what you want to do then is add back in the stuff you removed, but kind of blank it out, like this:
blink|5:
upgrade_required_path: sorcier
upgrade_required_casts: 400
parameters:
allow_passthrough: false
Here's a fully-working modified version of your configs, though I suspect a lot of it isn't necessary:
It fixed the problem for me, using your configs.. sorry, that's probably all I can do here!
@NathanWolf Sorry for the delay ; it doesn't change anything unfortunately.