Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-6723

PathfinderGoal var bO causes error

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Invalid
    • None
    • None
    • Linux Ubuntu
      java v16
      Spigot 1.17.1

    • CraftBukkit version 3227-Spigot-3c1fc60-a0a37f4 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
    • Mine
    • Yes

    Description

       

      I was trying to create some custom entities and I'm facing a problem causing this error :

      org.bukkit.event.EventException: null
       at 
       org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
      at 
       org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       org.bukkit.craftbukkit.v1_17_R1.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:499)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.server.level.PlayerInteractManager.a(PlayerInteractManager.java:485)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1527) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
      at 
       net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:33)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.network.protocol.game.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(SourceFile:151) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
      at 
       net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(SourceFile:125) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1148) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1141) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(SourceFile:134) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
      at 
       net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1125)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1054) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at java.lang.Thread.run(Thread.java:831) [?:?]
       Caused by: java.lang.NoSuchFieldError: bO
       at fr.kestrel.duilgmc.customentities.Snail.initPathfinder(Snail.java:29) ~[?:?]
      at 
       net.minecraft.world.entity.EntityInsentient.<init>(EntityInsentient.java:151)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.world.entity.EntityCreature.<init>(EntityCreature.java:17)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.world.entity.monster.EntityMonster.<init>(SourceFile:30)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at 
       net.minecraft.world.entity.monster.EntitySilverfish.<init>(EntitySilverfish.java:39)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       at fr.kestrel.duilgmc.customentities.Snail.<init>(Snail.java:19) ~[?:?]
       at fr.kestrel.duilgmc.events.GetBark.getBark(GetBark.java:31) ~[?:?]
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
       at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
       at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at 
       org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
       ~[spigot-1.17.1.jar:3227-Spigot-3c1fc60-a0a37f4]
       ... 20 more
      

      As you can see, the server doesn't detect the field, even if it is here in the .jar (used as library)
      The bug only append in the 1.17.1 version, my code's working in 1.17 version.

       

      Here is my code :

      public class Snail extends EntitySilverfish implements Listener {
          public Snail(Location loc) {
              super(EntityTypes.aA, ((CraftWorld)loc.getWorld()).getHandle());
              /*More code*/
          }
          @Override
          protected void initPathfinder() {
              this.bO.a(1, new PathfinderGoalFloat(this));
              this.bO.a(2, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
              this.bO.a(3, new PathfinderGoalRandomLookaround(this));
          }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            DaSea Jean Man
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: