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

Sticks and planks dropping from boat entities breaking is hardcoded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.4, 24w12a, 24w13a, 1.20.5, 1.20.6 Release Candidate 1
    • Confirmed
    • Entities, Loot tables

      The sticks and planks dropped from a boat breaking is not controlled by a loot table, but instead is hardcoded. This issue was created due to the recent fix for MC-267866.

      Steps to Reproduce:

      Since this bug report is about functionality that is missing, the only way to verify this issue is to look into the various loot tables in the game either by decompressing the game jar, or looking in the code of the game.

      Code analysis:

         protected void checkFallDamage(double p_38307_, boolean p_38308_, BlockState p_38309_, BlockPos p_38310_) {
      . . .
                     this.causeFallDamage(this.fallDistance, 1.0F, this.damageSources().fall());
                     if (!this.level().isClientSide && !this.isRemoved()) {
                        this.kill();
                        if (this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
      -> ISSUE START
                           for(int i = 0; i < 3; ++i) {
                              this.spawnAtLocation(this.getVariant().getPlanks());
                           }
                           for(int j = 0; j < 2; ++j) {
                              this.spawnAtLocation(Items.STICK);
                           }
      -> ISSUE END
                        }
                     }
                  }
                  this.resetFallDistance();
               } 
      . . .
         }
      

      Suggested Fix

      Introduce a loot table for sticks and planks dropped from boats.

      Notes:

      Related to MC-94610 MC-149589 MC-269838 MC-269839 MC-269873 MC-269874 MC-269875

            Unassigned Unassigned
            Jingy Jiingy
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              CHK: