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

Silverfish not moving when mobGriefing is false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 16w35a, Minecraft 16w36a
    • Fix Version/s: Minecraft 16w40a
    • Labels:
      None
    • Environment:

      Windows10
      Java 1.8.0 25 64bit

    • Confirmation Status:
      Confirmed

      Description

      When mobGriefing gamerule is false, silverfish won't even move, although will attack when on survival mode. Most likely caused by the fix of MC-80586.


      Code analysis by [Mod] Neko:

      The reason for this is the Silverfish first checks if mobGriefing is false, if so, the code returns false and the Silverfish cannot attempt to path find.

      EntitySilverfish.java (MCP)
          static class AIHideInStone extends EntityAIWander
          {
              public boolean shouldExecute()
              {
                  if (!this.silverfish.worldObj.getGameRules().getBoolean("mobGriefing"))
                  {
                      return false;
                  }
                  else if (this.silverfish.getAttackTarget() != null)
                  {
                      return false;
                  }
                  else if (!this.silverfish.getNavigator().noPath())
                  {
                      return false;
                  }
                  else //...
              }
          }
      

        Attachments

          Activity

            People

            • Assignee:
              FruBasilicum [Mojang] Agnes Larsson
              Reporter:
              gncinc@gmail.com Stuart Sterling Shoun
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: