CC: Tweaked

CC: Tweaked

42M Downloads

Crash after taking items from turtle, after turtle sucks items from chest. (Not reproducable)

muizzsiddique opened this issue ยท 2 comments

commented

This is a crash I was only able to reproduce one other time and in the same world because the save file was reverted, however since the world hasn't reverted again I lost the ability to reproduce it. I also haven't been able to reproduce this in a new world.

Steps I had taken:

  1. Used commands like "turtle.inspect()" on a chest and "turtle.craft()" whilst experimenting.
  2. Place two full stacks of items in the chest.
  3. Run "while turtle.suck() do end".
  4. Take sucked items back into inventory (without shift clicking).
  5. Leave inventory (press the 'Esc' key).
  6. Crash.

Minecraft version: 1.14
Fabric Loader version: 0.4.6+build.141
Fabric API version: 0.2.7+build.127
CC-Tweaked version: 1.82.4

Error reports:
https://pastebin.com/1jip89Nn
https://pastebin.com/1BCMFVRp

commented

Looks like it's trying to grant an advancement to a turtle. We'll need to finish the method stubs on TurtlePlayer, and possibly spoof the network.

commented

I've seen the same behavior in my world. I just checked if I could reproduce it.
As @SquidDev says it is indeed something to do with the advancements.
The easiest way to reproduce this is:

  1. Open a Creative world
  2. Grab a mining turtle, label it and fuel it up
  3. Grab an ore that drops it's item (Diamond, Redstone, Lapis, Emerald)
  4. Place 9 of them in a row (so one has enough to craft the related block).
  5. Let the turtle dig the ores. (Sample program added below)
  6. Remove the mined items from the turtle (shiftclicking or click+drop does not matter)
  7. Game crashes, since the game has not been saved one can enter the same world to keep doing it with the same material.

I also found out that when the player already has that advancement it does not seem to happen.

while(turtle.detect()) do
  turtle.dig()
  turtle.forward()
end