NOTE: Experimental Feature minecraft:minecarts_improvements is active.
Minecarts with Entity#noPhysics don't power detector rails, unless an other entity is walking over the rail. Then the detector rail stays powered until the minecart leaves the rail.
Reason: Entity#checkInsideBlocks(...) doesn't trigger BlockState#entityInside(...), because Entity#isAffectedByBlocks() returns false if noPhysics is assigned.
This makes sense, but there should be an exception for minecarts and detector rails.
Prior to 1.21.3 minecarts with noPhysics powered detector rails correctly.
Attachments
Comments 5
It isn't reproducable in vanilla gameplay. But it is a vanilla function, which is useful for mods and plugins.Entity#checkInsideBlocks(...), BlockState#entityInside(...) and Entity#noPhysics are methods and fields in the Minecraft code.
I don't have the original Minecraft code, but I do have the remapped code via paperweight. Yes, this is a third party software, but please don't reject it because of this. A mojang developer will understand what I mean.
To the attached image: This is the checkInsideBlocks(...) method in net.minecraft.world.entity.Entity. The marked line 1752 triggers the detector rails check, if there is a minecart present. Because of line 1724 the following code (including line 1752) will not execute, if the Minecart has noPhysics set to true.
If it's not an issue that you can see ingame, then how do you know it's an issue? If the code is how, then surely there is a way to confirm that from inside the game?
How do we reproduce this bug in order to confirm it?
It's only reproducable with third party applications. I'm a developer and programming server plugins on the base of PaperMC. In this specific case I'm coupling minecarts together and let them move as a train with a spacing of 1 blocks between the minecarts (so every 2.0 blocks is one minecart). I'm doing this by appling deltaMovement to the minecarts. To prevent the minecarts from bouncing off of each other on ascending rails, I turn off the physics.
Steps to reproduce:
Test 1: normal minecart (working)
1. Build a short railroad as shown in the screenshot in north-south orientation (3 normal rails + detector rail at the most southern point)
2. Place a minecart on the most northern rail
3. Apply deltaMovement aka Motion. Command: /execute as @e[type=minecraft:minecart,distance=..5] run data merge entity @s {Motion:[0d, 0d, 0.08d]}
4. Minecart will travel south and stop on the detector rail
5. Detector rail will be powered
Test 2: noPhysics minecart
1. Take the test track from test 1
2. Place a minecart on the most northern rail
3. Set the Field Entity#noPhysics to true (not possible with normal commands, only with code)
4. Apply deltaMovement aka Motion. (see test 1 step 3)
5. Minecart will travel south and stop on the detector rail
6. Detector rail will NOT be powered.
7. Walk through the minecart or sit in it. Detector rail will be powered now.
8. Detector rail will stay powered until the minecart leaves the rail (e.g. applying deltaMovement again)
This never appears during normal gameplay nor by using commands, so the priority of this bug is nearly zero. But I would be thankful if the devs would fix this.
Thank you for your report!
After consideration, the issue is being closed as Invalid.
This report does not describe a bug.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Please provide clear steps to reproduce this issue in a vanilla gameplay setting including any necessary commands, worlds, or setup. A video would be appreciated too if possible.