SirEdvin / Turtlematic

ComputerCraft addon that makes turtle great again!
MIT License
11 stars 2 forks source link

Crash on equpping automata core on a turtle #2

Closed 4loneWolf closed 1 year ago

4loneWolf commented 1 year ago

When i equipped the automata core on a turtle my game just crashed. Now, every time i log into the world it crashes me. Any idea?

Game version: 1.19.2 (Fabric)

Mod versions: -cc restitched: 1.101.2 -turtlematic: 0.5.0 -Peripheralium: 0.4.3 -ForgeConfigAPI: 4.2.7 and 4.2.6 the same thing -fabric-kotlin: 1.8.6 and 1.8.5 the same thing

---- Minecraft Crash Report ---- // Who set us up the TNT?

Time: 2022-11-23 22:11:18 Description: Ticking block entity

java.lang.AbstractMethodError: Receiver class site.siredvin.turtlematic.computercraft.plugins.AutomataLookPlugin does not define or inherit an implementation of the resolved method 'abstract void setConnectedPeripheral(site.siredvin.peripheralium.api.peripheral.IPluggablePeripheral)' of interface site.siredvin.peripheralium.api.peripheral.IPeripheralPlugin. at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.buildPlugins$lambda$0(PluggablePeripheral.kt:51) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.buildPlugins(PluggablePeripheral.kt:48) at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.getMethodNames(PluggablePeripheral.kt:102) at dan200.computercraft.core.apis.PeripheralAPI.getMethods(PeripheralAPI.java:375) at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.(PeripheralAPI.java:53) at dan200.computercraft.core.apis.PeripheralAPI.onPeripheralChanged(PeripheralAPI.java:233) at dan200.computercraft.core.computer.Environment.setPeripheral(Environment.java:317) at dan200.computercraft.shared.computer.core.ServerComputer.setPeripheral(ServerComputer.java:288) at dan200.computercraft.shared.turtle.core.TurtleBrain.updatePeripherals(TurtleBrain.java:759) at dan200.computercraft.shared.turtle.core.TurtleBrain.setupComputer(TurtleBrain.java:121) at dan200.computercraft.shared.turtle.blocks.TileTurtle.createComputer(TileTurtle.java:87) at dan200.computercraft.shared.computer.blocks.TileComputerBase.createServerComputer(TileComputerBase.java:382) at dan200.computercraft.shared.computer.blocks.TileComputerBase.serverTick(TileComputerBase.java:159) at dan200.computercraft.shared.turtle.blocks.TileTurtle.serverTick(TileTurtle.java:200) at dan200.computercraft.shared.computer.blocks.BlockComputerBase.lambda$new$0(BlockComputerBase.java:44) at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:660) at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:714) at net.minecraft.class_1937.method_18471(class_1937.java:456) at net.minecraft.class_3218.method_18765(class_3218.java:376) at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) at net.minecraft.class_1132.method_3748(class_1132.java:98) at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) at java.base/java.lang.Thread.run(Thread.java:833)

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Thread: Render thread Stacktrace: at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.buildPlugins$lambda$0(PluggablePeripheral.kt:51) at java.base/java.lang.Iterable.forEach(Iterable.java:75) at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.buildPlugins(PluggablePeripheral.kt:48) at site.siredvin.peripheralium.computercraft.peripheral.PluggablePeripheral.getMethodNames(PluggablePeripheral.kt:102) at dan200.computercraft.core.apis.PeripheralAPI.getMethods(PeripheralAPI.java:375) at dan200.computercraft.core.apis.PeripheralAPI$PeripheralWrapper.(PeripheralAPI.java:53) at dan200.computercraft.core.apis.PeripheralAPI.onPeripheralChanged(PeripheralAPI.java:233) at dan200.computercraft.core.computer.Environment.setPeripheral(Environment.java:317) at dan200.computercraft.shared.computer.core.ServerComputer.setPeripheral(ServerComputer.java:288) at dan200.computercraft.shared.turtle.core.TurtleBrain.updatePeripherals(TurtleBrain.java:759) at dan200.computercraft.shared.turtle.core.TurtleBrain.setupComputer(TurtleBrain.java:121) at dan200.computercraft.shared.turtle.blocks.TileTurtle.createComputer(TileTurtle.java:87) at dan200.computercraft.shared.computer.blocks.TileComputerBase.createServerComputer(TileComputerBase.java:382) at dan200.computercraft.shared.computer.blocks.TileComputerBase.serverTick(TileComputerBase.java:159) at dan200.computercraft.shared.turtle.blocks.TileTurtle.serverTick(TileTurtle.java:200) at dan200.computercraft.shared.computer.blocks.BlockComputerBase.lambda$new$0(BlockComputerBase.java:44) at net.minecraft.class_2818$class_5563.method_31703(class_2818.java:660) at net.minecraft.class_2818$class_5564.method_31703(class_2818.java:714) at net.minecraft.class_1937.method_18471(class_1937.java:456) at net.minecraft.class_3218.method_18765(class_3218.java:376)

SirEdvin commented 1 year ago

Yes, sorry for this. You need to downgrade peripheralium to 0.3.0 version and it should works.

I will try to publish compitability update shortly, have some problems with electricity :(

4loneWolf commented 1 year ago

Just noticed that the Fuel API is missing. I checked on the default automata core and the end one. I guess the rest of them are the same. They don't seem to have the Fuel API methods.

4loneWolf commented 1 year ago

@SirEdvin Aaaaaand i found another one. The end automata turtles sometimes warp into nowhere. They just disappear on the warpToPoint() function. I can't figure out how to recreate the problem? Sometimes it works, and sometimes it doesn't. I just place a new turtle, equip it with the automata core, refuel, then go into lua mode, type "a = peripheral.wrap(side at which automata core was placed)", and then just warp (a.warpToPoint()) to a random point (Saved or not, doesn't matter). If this doesn't make it disappear, try breaking it and placing it around, usually this does it.

SirEdvin commented 1 year ago

Okey, will take some look. Missing API is strange

SirEdvin commented 1 year ago

Hah, warp API bug actually a little fun. So, if you take a look at documentation you can notice, that after breaking and placing turtle again, your internal data about points are wiped. So you don't teleporting to existing point, but instead of just non-existing one. It should return error, but instead it teleports your turtle to 0, 0, 0.

I will release fix today

SirEdvin commented 1 year ago

This fixed in 0.5.1