-
Bug
-
Resolution: Unresolved
-
None
-
23w51a, 24w13a, 1.20.5 Pre-Release 4, 1.20.5, 1.20.6 Release Candidate 1, 1.20.6, 24w19b, 1.21
-
Confirmed
-
Commands
-
Low
-
Platform
Sniffers digging into the ground does not account for the scale attribute, resulting in the sniffer being able to dig multiple blocks away from their own position, or dig far too close to their inner hitbox at larger scales.
Steps to Reproduce:
- Create a super flat world
- Summon/spawn a sniffer
- Scale it downward to 0.25
/attribute @e[type=minecraft:sniffer,limit=1] minecraft:scale base set 0.25
- Wait for it to sniff a block
Observed Behavior:
The sniffer will play the animation as expected, but the block they dig over (and the block that shows particles) will be upwards of 2-3 blocks away from themselves. The behavior when scaling the sniffer upwards will be that the sniffer digs central to it's hitbox, disregarding it's head position.
Expected Behavior:
The sniffer in all cases would dig where it's head enters the ground, underneath it's hitbox.
Screenshots/Videos:
Code Analysis:
(From haykam in this comment)
The SnifferEntity#getDigLocation method uses a constant value of 2.25 when calculating the magnitude of the vector from the entity's rotation and bottom-center position, which is proportional to the typical sniffer's dimensions. A scaled sniffer, however, does not scale this constant value. A proposed fix is to use the expression 2.25 * this.getScale() instead.
- relates to
-
MC-270879 Cats with a large scale attribute won't properly pathfind to sit on applicable blocks
- Resolved
-
MC-270944 Hitbox directional indicator isn't visible with large mobs
- Resolved
-
MC-262449 Sniffers' searching animation scales with its movement speed, causing the searching animations to play rapidly or not at all
- Open
-
MC-268009 Fireballs shot from ghasts don't account for the scale attribute
- Open
-
MC-268010 Small fireballs shot from blazes don't accurately account for the scale attribute
- Open
-
MC-268415 Inventory does not open when player is significantly larger than the vehicle
- Open
-
MC-269290 Sniffers store wrong coordinates in sniffer_explored_positions
- Open
-
MC-269476 Scale Attribute does not scale hitbox for ladders and vines.
- Open
-
MC-267486 Polar Bear's attack system is not working on large scale
- Reopened