jusdino / BuildPortals

Mincreaft plugin for player-buildable teleportation portals
https://dev.bukkit.org/projects/buildportals
GNU General Public License v3.0
10 stars 5 forks source link

destZmax is null #36

Open jusdino opened 2 years ago

jusdino commented 2 years ago

BuildPortals 2.0.0 threw this stack trace when trying to go through a portal:


java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because "destZmax" is null
        at space.frahm.buildportals.Portal.getDestination(Portal.java:429) ~[BuildPortals-2.0.0.jar:?]
        at space.frahm.buildportals.Portal.teleport(Portal.java:144) ~[BuildPortals-2.0.0.jar:?]
        at space.frahm.buildportals.PortalListener$1.run(PortalListener.java:67) ~[BuildPortals-2.0.0.jar:?]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.18.2.jar:git-Paper-311]
        at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:483) ~[paper-1.18.2.jar:git-Paper-311]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1531) ~[paper-1.18.2.jar:git-Paper-311]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:483) ~[paper-1.18.2.jar:git-Paper-311]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1455) ~[paper-1.18.2.jar:git-Paper-311]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1225) ~[paper-1.18.2.jar:git-Paper-311]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315) ~[paper-1.18.2.jar:git-Paper-311]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]```
jusdino commented 2 years ago

Somehow, a portal was created with no interior vectors:


    A:
      world: world
      frame:
      - 43.0,58.0,30.0
      - 43.0,61.0,30.0
      - 43.0,59.0,29.0
      - 43.0,60.0,29.0
      - 43.0,59.0,31.0
      - 43.0,60.0,31.0
      yaw: '90.0'
      vec: []
    B:
      vec:
      - -603.0,159.0,-898.0
      - -603.0,160.0,-898.0
      yaw: '90.0'
      world: world
      frame:
      - -603.0,158.0,-898.0
      - -603.0,161.0,-898.0
      - -603.0,159.0,-899.0
      - -603.0,160.0,-899.0
      - -603.0,159.0,-897.0
      - -603.0,160.0,-897.0
    active: true```

Destroying and reactivating the same portals did not reproduce this.
jusdino commented 2 years ago

Was able to make this happen a second time:


    A:
      world: world
      frame:
      - 5.0,67.0,111.0
      - 5.0,67.0,110.0
      - 5.0,72.0,111.0
      - 5.0,72.0,110.0
      - 5.0,68.0,109.0
      - 5.0,69.0,109.0
      - 5.0,70.0,109.0
      - 5.0,71.0,109.0
      - 5.0,68.0,112.0
      - 5.0,69.0,112.0
      - 5.0,70.0,112.0
      - 5.0,71.0,112.0
      yaw: '90.0'
      vec: []
    B:
      vec:
      - -336.0,71.0,-146.0
      - -336.0,72.0,-146.0
      - -336.0,73.0,-146.0
      - -336.0,71.0,-147.0
      - -336.0,72.0,-147.0
      - -336.0,73.0,-147.0
      - -336.0,71.0,-145.0
      - -336.0,72.0,-145.0
      - -336.0,73.0,-145.0
      yaw: '90.0'
      world: world_nether
      frame:
      - -336.0,70.0,-146.0
      - -336.0,70.0,-147.0
      - -336.0,70.0,-145.0
      - -336.0,74.0,-146.0
      - -336.0,74.0,-147.0
      - -336.0,74.0,-145.0
      - -336.0,71.0,-148.0
      - -336.0,72.0,-148.0
      - -336.0,73.0,-148.0
      - -336.0,71.0,-144.0
      - -336.0,72.0,-144.0
      - -336.0,73.0,-144.0
    active: true```

In both cases, portal 'A' was left with the activator materials still present.