Details

    • Confirmation Status:
      Unconfirmed

      Description

      The bug

      The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

      Based on the code of the method net.minecraft.entity.projectile.EntityFishHook.handleHookRetraction() it is very likely that fishing rods (or rather their hooks) can pull items.

      public int handleHookRetraction()
      {
          if (this.worldObj.isRemote)
          {
              return 0;
          }
          else
          {
              int i = 0;
      
              if (this.caughtEntity != null)
              {
                  this.func_184527_k();
                  this.worldObj.setEntityState(this, (byte)31);
                  i = this.caughtEntity instanceof EntityItem ? 3 : 5;
              }
              else if (this.ticksCatchable > 0)
              {
                  // Loot
                  // ...
                  i = 1;
              }
      
              if (this.inGround)
              {
                  i = 2;
              }
      
              this.setDead();
              this.angler.fishEntity = null;
              return i;
          }
      }
      

      More precisely the part

      i = this.caughtEntity instanceof EntityItem ? 3 : 5;
      

      The local variable i represents the amount of durability the fishing rod loses. It is very unlikely that you type a complete line just by accident.

      How this could be fixed

      This could be fixed by having the method net.minecraft.entity.projectile.EntityFishHook.onUpdate() test if an entity intersecting with the bounding box is an instanceof EntityItem.

      // Replaced this
      //if (entity1.canBeCollidedWith() && (entity1 != this.angler || this.ticksInAir >= 5))
      if ((entity1 instanceof EntityItem || entity1.canBeCollidedWith()) && (entity1 != this.angler || this.ticksInAir >= 5))
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                grum [Mojang] Grum (Erik Broes)
                Reporter:
                marcono1234 [Helper] Marcono1234
              • Votes:
                51 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: