Minecart behaviour is different compared to 1.21.1 even when the "Minecarts Improvements" experiment is not enabled. I'm assuming this is unintended because it was not mentioned anywhere in any changelogs.
This bug negatively affects some sensitive redstone contraptions using minecarts made by the technical minecraft community.
Steps to reproduce
Download the attached world and open it in 1.21.1 or build the setup shown in the attached screenshot.
Flick the lever so that the dispenser spawns a minecart.
Observe how the minecart doesn't get destroyed by the lava cauldron.
Now open the world in 1.21.2-rc1 and repeat the previous steps.
Observe how the minecart ends up getting destroyed by the lava cauldron.
Can confirm 1.21.2rc1
This happens because of the way how MC-276876 was fixed, previously (in 1.21) upon ticking, the cart would damage itself in 2 places in its tick, first here in the
moveAlongTrack()method in theAbstracktMinecraft.java, (it callsenitity.move()which has the cauldron collision check in thetryCheckInsideBlocks()method thats within.) and the scond time the cart damages self upon executing thethis.checkInsideBlocks(); within thetick()method in theAbstracktMinecraft.javaSo 2 damage calls here and here:
But after the fix of MC-276876 the first damage call was moved to another place which changed the order of important stuff within the cart (and also boat) ticks.
Now it looks like this:
Notice that the cart no longer damages itself within the
moveAlongTrack()method, previously it happened within themove()call within it, butentity.move()no longer does collision checks with cauldrons and such blocks in 1.21.2 rc1The damage now happens 2 times, both within the .
applyEffectsFromBlocks()method, thus the first damage call happans way later compared to where it was called in 1.21.the fix for this issue should be simple: just move the duplicate
applyEffectsFromBlocks()call from hereto here (right after the cart calls
enity.move()on self, it deos so within thethis.minecart.move()within themoveAlongTrack()method):Please notice that the same exact issue happens to Boats, the fix for them is the same, just move the duplicate collision chechk to where it is logically supposed to be:
Also it is important to note that fixing the issue the way described above should make it so both this issue and the MC-276876 are fixed