Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-274186

Scutes spawned from baby turtles growing up do not account for the scale attribute

XMLWordPrintable

    • Confirmed
    • Commands, Items

      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:

      1. Freeze game ticks:
        /tick freeze
        
      2. Summon a baby turtle which is about to grow up
        /summon minecraft:turtle ~ ~ ~ {NoAI:1b,Age:-1}
        
      3. Increase its scale value
        /attribute @n[type=minecraft:turtle] minecraft:generic.scale base set 30
        
      4. Advance the game by one tick
        /tick step 1
        
      5. 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);
            }
         }
      

      Notes:

      1. Related to other "account for scale" issues: MC-272095 MC-270942 MC-270878
      2. Related to other turtle scute spawning issues: MC-271739

            Unassigned Unassigned
            Jingy [Helper] Jiingy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: