Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soul sand does not clip minecart in 1.17.1 paper #6779

Closed
Windmill1055 opened this issue Oct 15, 2021 · 3 comments
Closed

Soul sand does not clip minecart in 1.17.1 paper #6779

Windmill1055 opened this issue Oct 15, 2021 · 3 comments
Assignees
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.17 Game version 1.17

Comments

@Windmill1055
Copy link

Windmill1055 commented Oct 15, 2021

Expected behavior

In the vanilla or spigot gameplay, when a minecart is inside a soul sand block, the minecart will be clipped at the height when it is pushed inside the soul sand.

Observed/Actual behavior

in paper 1.16.5 the paper's behaviour is the same as the spigot's. Soul sand can clip minecart
in paper 1.17.1 server, the soul sand can not clip minecart anymore, it will straightly fall down to the ground level or void

Steps/models to reproduce

firstly, build something like this
image
then, activate the lever, the first image shows the behaviour in vanilla 1.17, spigot 1.17 and paper 1.16, the second image shows the behaviour in paper 1.17
image
image

Plugin and Datapack List

no plugins

Paper version

This server is running Paper version git-Paper-327 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 8575248)

Other

in 1.16, the soul sand clip behaves the same in paper, spigot and vanilla, but in 1.17.1 paper soul sand can not clip minecart anymore, so i assume this is a bug

@Windmill1055 Windmill1055 added status: needs triage type: bug Something doesn't work as it was intended to. labels Oct 15, 2021
@limbo-app limbo-app added version: 1.17 Game version 1.17 and removed status: needs triage labels Oct 15, 2021
@Spottedleaf
Copy link
Member

Spottedleaf commented Oct 15, 2021

This bug is caused by the collision optimisations patch, at two specific places:

  1. the parsing from AABB -> VoxelShape
  2. retrieving individual AABBs from VoxelShape

Soulsand, since its y height is <= 1.0 (roughly) and its min y >=0.0 (roughly) will actually be split up into two distinct collision boxes - as demonstrated in your screenshot. The code vanilla had in parsing AABB -> VoxelShape was responsible for figuring out that and creating the corresponding VoxelShape - the collision optimisation patch replaces that without that rule. So that part of the code needs to be reverted or addressed.

2 however is not so simple, as the vanilla method to retrieve individual AABBs from a VoxelShape will not report soulsand as having two distinct collision boxes, but rather one - this is because the boxes are close enough that it treats them as one. I need to write a different method that will not do that. But that's not easy, because the reason it is merging the shapes is to enforce the collision rules that have been adopted since 1.14. So I have to somehow retain the collision rules and the distinct collision boxes.

The primary reason the collision optimisation patch works is because it can take a VoxelShape and convert it to an equivilant set of AABBs - as AABBs are significantly faster to work with. This means the patch must be reverted or 1&2 must be fixed for this issue to be resolved.

Fixing this also carries significant risk of breaking collisions due to 2. So while this is an accepted issue, it will take time to fix properly.

@Spottedleaf Spottedleaf self-assigned this Oct 15, 2021
@Machine-Maker Machine-Maker added the status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. label Oct 16, 2021
jpenilla added a commit that referenced this issue Dec 5, 2021
jpenilla added a commit that referenced this issue Dec 5, 2021
kennytv added a commit that referenced this issue Dec 5, 2021
This reverts commit 78faaa4.
@Machine-Maker Machine-Maker reopened this Dec 5, 2021
@Machine-Maker
Copy link
Member

Machine-Maker commented Dec 15, 2021

@Windmill1055 can you confirm this still happens after/including build 77 of 1.18.1?

EDIT: closing as resolved as I reliably get the expected results

@lordofpipes
Copy link

I posted my ugly workaround fix in the 1.18 version of this thread #7408 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.17 Game version 1.17
Projects
None yet
Development

No branches or pull requests

5 participants