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

Player with the name Notch does not drop an apple at death anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • Minecraft 16w05b, Minecraft 1.12 Pre-Release 5, Minecraft 1.13, 1.18.2, 1.20.4
    • Confirmed
    • (Unassigned)

      The bug

      This is based on a decompiled version of Minecraft 1.8 using MCP. All method and class names are names used in the decompiled version.

      When a player with the name "Notch" dies he used to drop an apple. This is no longer the case in 1.8 because the method public void onDeath(DamageSource cause) of the class net.minecraft.entity.player.EntityPlayer is not called anymore. This creates unused code in this class as well as in the public EntityItem func_146097_a(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_) method which is used for dropping items.
      This method has the parameter boolean p_146097_2_ to determine whether the player died and the items should not be thrown.

      Because this method was only called with this parameter set to true by the public void onDeath(DamageSource cause) method of the net.minecraft.entity.player.EntityPlayer class, this piece of code is no longer needed.

      How to reproduce

      1. Copy the latest version folder in the .minecraft\versions directory and append _custom to the copied name, resulting in for example 1.12-pre5_custom
      2. Delete the .jar file inside the folder
      3. Append _custom to the version .json file name as well
      4. Replace the content of the version .json file with the following
        {
          "id": "#VERSION#_custom",
          "time": "2038-01-19T03:14:07+00:00",
          "releaseTime": "2038-01-19T03:14:07+00:00",
          "type": "snapshot",
          "minecraftArguments": "--username Notch --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid 069a79f444e94726a5befca90e38aaf5 --accessToken ${auth_access_token} --userType ${user_type} --versionType ${version_type}",
          "inheritsFrom": "#VERSION#",
          "jar": "#VERSION#"
        }
        
      5. Replace all occurences of #VERSION# with the version id you created a copy of, for example 1.12-pre5
      6. Select this version in the launcher and start the game
      7. Die

            Unassigned Unassigned
            marcono1234 Marcono1234
            Votes:
            13 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: