PolymerPorts / cc-tweaked-patch

GNU Lesser General Public License v3.0
6 stars 2 forks source link

Server crashes on turtle unequip upgrades #6

Closed Aranyalma2 closed 6 months ago

Aranyalma2 commented 6 months ago

Version

1.110+1.20.6

The server crashes if turtle unequips any upgrade item.

Server log:

[13:58:37] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.class_148: Ticking block entity
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:1002) ~[server-intermediary.jar:?]
    at net.minecraft.class_3176.method_3813(class_3176.java:294) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:889) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:691) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:275) ~[server-intermediary.jar:?]
    at java.base/java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "dan200.computercraft.api.turtle.ITurtleUpgrade.getCraftingItem()" because "upgrade" is null
    at eu.pb4.cctpatch.impl.poly.model.TurtleModel.getUpgradeModel(TurtleModel.java:139) ~[cc-tweaked-polymer-patch-1.111.0.0+1.20.6.jar:?]
    at eu.pb4.cctpatch.impl.poly.model.TurtleModel.setUpgrades(TurtleModel.java:118) ~[cc-tweaked-polymer-patch-1.111.0.0+1.20.6.jar:?]
    at eu.pb4.cctpatch.impl.poly.model.TurtleModel.update(TurtleModel.java:175) ~[cc-tweaked-polymer-patch-1.111.0.0+1.20.6.jar:?]
    at dan200.computercraft.shared.turtle.core.TurtleBrain.handler$zzd000$cc-tweaked-polymer-patch$onUpdate(TurtleBrain.java:830) ~[cc-tweaked-1.20.6-fabric-1.111.0.jar:?]
    at dan200.computercraft.shared.turtle.core.TurtleBrain.update(TurtleBrain.java:125) ~[cc-tweaked-1.20.6-fabric-1.111.0.jar:?]
    at dan200.computercraft.shared.turtle.blocks.TurtleBlockEntity.serverTick(TurtleBlockEntity.java:105) ~[cc-tweaked-1.20.6-fabric-1.111.0.jar:?]
    at dan200.computercraft.shared.computer.blocks.AbstractComputerBlock.lambda$new$0(AbstractComputerBlock.java:35) ~[cc-tweaked-1.20.6-fabric-1.111.0.jar:?]
    at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:664) ~[server-intermediary.jar:?]
    at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:718) ~[server-intermediary.jar:?]
    at net.minecraft.class_1937.method_18471(class_1937.java:482) ~[server-intermediary.jar:?]
    at net.minecraft.class_3218.method_18765(class_3218.java:412) ~[server-intermediary.jar:?]
    at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:998) ~[server-intermediary.jar:?]
    ... 5 more