Paper: TnT player cannon not working on creative (working on survival)

Created on 30 Jul 2019  路  11Comments  路  Source: PaperMC/Paper

What behaviour is expected:

place TNT and just go flying

What behaviour is observed:

There's no effect, the tnt doesn't even push me anywhere.

Steps/models to reproduce:

Make the tnt canon on creative with obsidian and redstone, a fence on the middle. Surround yourself on Tnt. Be on creative. Explode

Plugin list:

Server restorer https://www.spigotmc.org/resources/serverrestorer.48853/
WorldBorder
AutoRestart

Paper build number:

Paper-149
MC 1.14.4

Anything else:

Do you want my yml files? I did some edits found here https://www.spigotmc.org/threads/guide-server-optimization%E2%9A%A1.283181/ (and maybe some found here by accident, because I found it first https://www.spigotmc.org/threads/guide-optimizing-spigot-remove-lag-fix-tps-improve-performance.21726/). I did try disabling optimize explosions and no effect

Also, dream about cheese, for luck

help wanted accepted bug 1.16 we must go deeper

Most helpful comment

The problematic change is https://github.com/PaperMC/Paper/blob/master/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch#L16 . Removing this patch fixed the issue.

This is caused by IEntitySelector.canAITarget().test(entity), where canAITarget() is:

!(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();

I don't see the reason this check is required, though there might be some important reason why - if you know it, I'd love to hear it. Working on a fix for it.

All 11 comments

Can you provide a screenshot of the Cannon so the team can try to reproduce?

Sorry I was not notified. I also realized people don't call it a tnt cannon, it's actually a tnt player canon

I took screenshots and made a video
2019-07-31_00 18 29
2019-07-31_00 19 11
2019-07-31_00 18 49

https://streamable.com/pucrn 3 minutes long, I try to do it in survival and creative (the video is being uploaded at the time I made this comment) edit: rip video, 3 month inactivity, should had done youtube

yo @MiniDigger you getting notified?
I don't get how github doesn't notify me, I am guessing this is a thing for everybody

yes I am getting notified, but I can't help you. I was just making sure that the team has enough information to help you.

@MiniDigger alright I understand

Bump?

Can confirm it doesn't happen on freshly built 1.16.1 Spigot git-Spigot-9639cf7-4b9bc9d, but does happen on Paper 1.16.1 build 138.

There was a similar issue in Spigot https://hub.spigotmc.org/jira/browse/SPIGOT-5258, which got since fixed: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/diff/nms-patches/EntityHuman.patch?until=b2bcde89d9267709f81fda53afa7cd3d7204c7b6

In Paper it looks like EntityPlayer.damageEntity method is not called at all for creative players for some reason - unfortunately wasn't able to find the root cause yet.

Looks like it is, unless I'm bad at reading:

https://github.com/PaperMC/Paper/blob/master/Spigot-Server-Patches/0033-Disable-explosion-knockback.patch#L18

I suppose the bug is by default it's false but still not working?

This is not the patch that causes it. Completely removing this patch doesn't fix the issue.

The only patch I was expecting was the Cancelable entity death event, since it appears to be the only one messing with it directly, but removing it didn't fix the issue either.

The problematic change is https://github.com/PaperMC/Paper/blob/master/Spigot-Server-Patches/0031-Fix-lag-from-explosions-processing-dead-entities.patch#L16 . Removing this patch fixed the issue.

This is caused by IEntitySelector.canAITarget().test(entity), where canAITarget() is:

!(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();

I don't see the reason this check is required, though there might be some important reason why - if you know it, I'd love to hear it. Working on a fix for it.

Thank you guys for working on this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

James94665 picture James94665  路  3Comments

zedwick picture zedwick  路  3Comments

mibby picture mibby  路  3Comments

successed picture successed  路  3Comments