CC: Tweaked

CC: Tweaked

59M Downloads

Server start results in error when using computer startup.lua

M3wP opened this issue ยท 4 comments

commented

Minecraft Version

1.19.x

Version

1.101.3

Details

When starting the server, an error is thrown when a computer is configured to have a startup.lua program and is using a peripheral (the example here was from an advanced husbandry turtle).

I'm using CC: Tweaked from the Valhelsia 5.1.1 modpack. The server is running separately from the client. It may not be an issue when running the built-in server with the client.

The following error is thrown from the server:

[06:12:34] [Server thread/ERROR] [computercraft/]: Error running task
java.lang.NullPointerException: Cannot invoke "de.srendi.advancedperipherals.common.util.fakeplayer.APFakePlayer.m_143425_(net.minecraft.server.level.ServerLevel)" because "player" is null
	at de.srendi.advancedperipherals.common.util.fakeplayer.FakePlayerProviderTurtle.load(FakePlayerProviderTurtle.java:37) ~[AdvancedPeripherals-1.19.2-0.7.29r.jar%23337!/:0.7.29r]
	at de.srendi.advancedperipherals.common.util.fakeplayer.FakePlayerProviderTurtle.withPlayer(FakePlayerProviderTurtle.java:109) ~[AdvancedPeripherals-1.19.2-0.7.29r.jar%23337!/:0.7.29r]
	at de.srendi.advancedperipherals.common.addons.computercraft.owner.TurtlePeripheralOwner.withPlayer(TurtlePeripheralOwner.java:88) ~[AdvancedPeripherals-1.19.2-0.7.29r.jar%23337!/:0.7.29r]
	at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.plugins.AutomataEntityHandPlugin.inspectAnimal(AutomataEntityHandPlugin.java:59) ~[AdvancedPeripherals-1.19.2-0.7.29r.jar%23337!/:0.7.29r]
	at de.srendi.advancedperipherals.common.addons.computercraft.peripheral.plugins.AutomataEntityHandPlugin$cc$inspectAnimal32.apply(CC generated method) ~[?:?]
	at dan200.computercraft.core.asm.PeripheralMethod.lambda$static$0(PeripheralMethod.java:21) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.core.computer.LuaContext.lambda$issueMainThreadTask$0(LuaContext.java:32) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.core.computer.mainthread.MainThreadExecutor.execute(MainThreadExecutor.java:146) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.core.computer.mainthread.MainThread.tick(MainThread.java:144) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.shared.computer.core.ServerContext.tick(ServerContext.java:148) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.shared.CommonHooks.onServerTick(CommonHooks.java:56) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at dan200.computercraft.shared.__CommonHooks_onServerTick_ServerTickEvent.invoke(.dynamic) ~[cc-tweaked-1.19.2-1.101.3.jar%23377!/:1.101.3]
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) ~[eventbus-6.0.3.jar%2351!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.3.jar%2351!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.3.jar%2351!/:?]
	at net.minecraftforge.event.ForgeEventFactory.onPreServerTick(ForgeEventFactory.java:844) ~[forge-1.19.2-43.2.21-universal.jar%23580!/:?]
	at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:804) ~[server-1.19.2-20220805.130853-srg.jar%23575!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:654) ~[server-1.19.2-20220805.130853-srg.jar%23575!/:?]
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:244) ~[server-1.19.2-20220805.130853-srg.jar%23575!/:?]
	at java.lang.Thread.run(Thread.java:1589) [?:?]
commented

CC @SirEndii - I suspect this might be an AdvancedPeripheral issue instead?

commented
commented

A known bug

https://mvn.intelligence-modding.de/#/Intelligence/de/srendi/advancedperipherals/advancedperipherals-snapshots/1.19.2-0.7.29r-SNAPSHOT-79

This build should fix the issue. Note that this version has fixed bugs or introduced features which aren't documented yet.

There is maybe one bug which stops the gaming from starting. This occurs by a miss configured create version in the mods.toml, let me know if you have issues

commented

Yes, it seems that the computer does succeed in startup now, at least.