Turtle crashes my server upon usage with this script.
ReSteGuy opened this issue ยท 1 comments
Minecraft Version
1.20.x
Version
1.109.5
Details
I'm using Magma Maintained but I'd like to see if this is a mod or script bug.
crash-2024-02-15_19.18.11-server.txt
print("Finding Manager...")
print("Manager Found.")
print("Precautions...")
if not turtle.getFuelLevel() == 0 then
print("Fuel is not drained")
else
print("No more fuel!")
turtle.refuel()
if not turtle.getFuelLevel() == 0 then
return "Error!"
else
print("Refueled to "..turtle.getFuelLevel().."!")
end
end
rednet.open("right")
print("All systems checked!")
shutdowner = false
while not shutdowner do
sleep(0.5)
turtle.forward()
turtle.dig()
end
print("Byebye!")
Thanks for the report! This appears to be an issue with CraftBukkit/Magma rather than CC:T - this doesn't occur on normal Forge.
Stack trace for easier reference
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.player.Inventory.m_36056_()" because the return value of "org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryPlayer.getInventory()" is null
at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryPlayer.getItemInMainHand(CraftInventoryPlayer.java:31) ~[forge-1.20.1-47.2.20-universal.jar%2378!/:?] {re:classloading}
at net.minecraft.server.level.ServerPlayerGameMode.isSwordNoBreak(ServerPlayerGameMode.java:402) ~[server-1.20.1-20230612.114412-srg.jar%2373!/:?] {re:classloading}
at net.minecraft.server.level.ServerPlayerGameMode.m_9280_(ServerPlayerGameMode.java:323) ~[server-1.20.1-20230612.114412-srg.jar%2373!/:?] {re:classloading}
at dan200.computercraft.shared.turtle.upgrades.TurtleTool.lambda$dig$0(TurtleTool.java:317) ~[cc-tweaked-1.20.1-forge-1.109.5.jar%2368!/:1.109.5] {re:classloading}
at dan200.computercraft.shared.turtle.upgrades.TurtleTool.withEquippedItem(TurtleTool.java:149) ~[cc-tweaked-1.20.1-forge-1.109.5.jar%2368!/:1.109.5] {re:classloading}
at dan200.computercraft.shared.turtle.upgrades.TurtleTool.dig(TurtleTool.java:297) ~[cc-tweaked-1.20.1-forge-1.109.5.jar%2368!/:1.109.5] {re:classloading}