Items, boats and minecarts have no invulnerability time, causing them to receive significantly more damage from cactus, lava, fire and explosions
Resolved
Works As Intended
19
The Bug: Unlike other mob entities, environmental damage deals extra damage to items, boats, and minecarts causing them to disappear instantly instead of a few seconds.
To Reproduce: 1. Throw an item onto a cactus. 2. Summon a chicken on a cactus.
Results: Although items have more health than a chicken, they disappear quicker than the chicken.
Code Analysis: Code analysis by @unknown can be found in this comment.
Players and mobs use a timer to count down the next time they can take damage as described here called invulnerableTime. Which means that non-mob entities don't take more damage, but take damage every tick instead of every 10 ticks. Interestingly, the field invulnerableTime is available in the Entity class, so all that needs to be done is to take the logic from players/mobs and apply it to the other entities.
hey i just wanted to say that yes i did check the history but it was after i already instinctually posted the question sorry, i didn't want to clarify as that would just add clutter to the comment thread but here we are anyways
I just wanted to clarify that there are considerable implications for this bug depending on how it's fixed.
If this fix is just adding the invulnerability timer to items boats and minecarts then only items will be affected as boats and minecarts don't utilise the traditional health system. This is mostly a good thing as it means your items won't instantly evaporate when they touch cactus and blast chambers that utilise multiple TNT explosions in quick succession won't be as inefficient. A negative for this type of change would be that box yeeters, a device that uses cacti to quickly break open shulker boxes, will be affected as the shulker boxes will take longer to break and will get stuck in unintended positions. Instead lava could be used but this
BUT if this fix is one where health is added to carts and boats AND then the invulnerability timer is added then a vast majority of all contraptions that utlise carts and boats will be adversely affected. For example portal loaders will be come laggier as the minecarts will take longer to die and loaders that use boats will become unreliable as the extra time boats take to be destroyed will allow time for entities to ride in them and break the device. Cart yeeters, the new fruitful 1.19 tech, where a minecart is broken instantly to drop its contents and the cart item, will break as the additional time the cart takes to die will mean that the items sprawl out from an unintended position.
this is a feature request. there is 0 indication that the behaviour of boats,carts ,items should be the same as living entities nor is anything funny in the code happening... items,carts,boats etc are not the same as a creeper https://feedback.minecraft.net/hc/en-us
Thank you for your report! After consideration, the issue is being closed as Working as Intended.
Please note, that mechanics of the game may change between updates. Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Players and mobs use a timer to count down the next time they can take damage as described here called
invulnerableTime. Which means that non-mob entities don't take more damage, but take damage every tick instead of every 10 ticks. Interestingly, the fieldinvulnerableTimeis available in theEntityclass, so all that needs to be done is to take the logic from players/mobs and apply it to the other entities.