mojira.dev
MC-226257

Items, boats and minecarts have no invulnerability time, causing them to receive significantly more damage from cactus, lava, fire and explosions

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.

Linked issues

Comments 11

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 is the owner of this report still active? If not I'd like to help contribute to this, thanks

Yes, the owner is still active.

Just look at the history of the report next time. (And if that seems inactive, check the user's activity feed.)

1 more comments

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

still in 1.19 release-candidate 1

Can confirm in 1.20.4 Release Candidate 1

can confirm in 24w40a

InfinitySwordofDiamond

(Unassigned)

Confirmed

Entities

1.16.5, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 2, 1.17 Pre-release 3, ..., 25w31a, 25w32a, 25w33a, 25w34b, 25w35a

Retrieved