The position of turtle scutes spawned from turtles growing up do not account for the scale attribute, resulting in them always spawning in the same place regardless of the entity's size.
Steps to Reproduce:
- Freeze game ticks:
/tick freeze
- Summon a baby turtle which is about to grow up
/summon minecraft:turtle ~ ~ ~ {NoAI:1b,Age:-1}
- Increase its scale value
/attribute @n[type=minecraft:turtle] minecraft:generic.scale base set 30
- Advance the game by one tick
/tick step 1
- If necessary, move inside the turtle entity and observe where the scute spawned
Observed Behavior:
The scute spawns inside the turtle, where it normally would at a regular scale of 1.
Expected Result:
The scute would consistently spawn above the turtle.
Screenshots/Videos:
Code Analysis:
This is the code that handles spawning the scute item. Notice how it simply "spawns at location" and never considers the scale value of the entity.
protected void ageBoundaryReached() { super.ageBoundaryReached(); if (!this.isBaby() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { this.spawnAtLocation(Items.TURTLE_SCUTE, 1); } }