This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BrunoZockt's profile picture

Ore Collecting Miner - a very advanced mining program

Started by BrunoZockt, 06 August 2018 - 08:25 PM
BrunoZockt #1
Posted 06 August 2018 - 10:25 PM
History:Ok…. so…4 years ago I first discovered mods in minecraft, in particular ComputerCraft. I was instantly stunned by all the possibilities this mod opened. So I got into coding, a very frustrating experience. I wasn't too good in English at that time and had never coded before, which is why I gave up quite fast. But around a year later some video inspired me to get back at it again, couldn't be too hard right? And indeed, I had a lot more success this time. That's when I started writing this program which started as a normal strip mining program. Once it worked I figured it would be nice if the turtlle could mine the ores for me too. I discovered the compare function (which has since then been replaced by the inspect functions). That was the beginning of a huge learning process for me. The first working Version was about 3000 lines because I didn't know about tables at that time and therefore specified 72 variables (from "a" to "zzz" :D/> ) to hold the information of how to get back to the main tunnel. When I proudly presented the program at my internship the poor guys had to hold back from vomiting and made me aware of the existance of tables. Following this big evolution I improved the program further and further for the sake of challenging myself whenever I really wanted to code. This has been going on for over 2 years now, before I decided to post this program here (where I also received a lot of help over this journey) so all the work wouldn't have been for "nothing".

What it does:
Once started, this program will dig a main tunnel with n adjacent tunnels which length can be customized too. The interesting thing is that this program will find and mine ores that it comes across so that there is no work left to do for you.



Requirements:
Although I did program it to work pre 1.64 I've never tested it out, so no garanties. It is optimized for Computercraft Version 1.64 or higher.
An advanced turtle is required due to the color and mouse support

Key features:
  • automatic updateAs soon as I release a new update on pastebin, the program will update on next startup and notify you afterwards. All your variables will be saved.
  • Automatically continues after world reload/server restartThe program will automatically save my startup handler at /startup, move any existing startup-programs to "old_startup" and set this "old_startup" as standart startup so that it is executed whenever no program needs to resume. To make sure that the program doesn't continue into a wrong direction it figures out where it is facing before every start, and adjusts if necessary.
  • intuitive, clean layout to navigate through the starting process
  • supports the EnderStorage enderchest
  • completly customizable and savable settings
  • Anti-Mobspawn-Torch-Algorithm-Thing (scientificly reffered to as AMTAT)When this option is selected the turtle will calculate the amount of torches it needs to be as low as possible while still preventing mobs from spawning (don't want to brag but this shit is genius)
  • Autofuel
  • place floor
  • place walls and ceiling
  • Ignor-listItems contained in the ignor-list will -who would've guessed- be ignored by the turtle when searching for ores. You can easily add and remove blocks to/from it.
  • Throw away trash
  • Stable af:
    • gravel-proof
    • water-/lavaproof
    • mob-proof
    • wont crash when out of fuel
    • will place torches under any circumstances
    • wont crash when materials (e.g. torches or chest) are missing
    • fuel = "unlimited" -proof
What about those quarry programs?
Well, this program wont move in height and therefore be a lot more efficient if you are searching for specific ores since their occurrence depends on the level above bedrock.
Also, this program doesn't destroy a huge area, you can easily run it in your cellar.

Known Bugs:
Walls aren't placed consistently.

Planned features:
Disclaimer: I am not as motivated and heavily invested in the developement of this program as I was when posting this, these features may therefore never be realised. Sorry.
  • automatically continue after server restart (very difficult but I'm working on it and it will probably come within the next patch before October)
  • option to let the turtle dig down before starting so that you can execute this program from the surface
  • snail option (Currently working on it and it's rather easy but very hard to implement into the existing code.)
  • test all the code for Version < 1.64 and make it compatible
  • make all Buttons clickable so that you can use the entire program with only one hand, leaving the other hand to eat crisps for ultimate comfort
  • live feedback screen while the turtle is running to see progress in %, estimated time, true time etc.
  • write custom read function or use existing API (if I find a good one) to optimize the options page further
  • implement chunkloaders (very difficult, so be patient)
Installation:
The code can be found on pastebin and therefore also be used in your turtle directly via "pastebin get gkz5sgZ8 OCM"
On first startup you need an internet connection and the http API activated, so that my program can install all its dependancies itself.
Since it's quite a complex program you're gonna need more than 100kb of free storage which shouldn't be a problem but might be restricted if you are playing on a server.

I hope this program turns out to be useful to some of you. I would love to get some feedback. Suggestions, bug reports, english corrections etc. are also very welcome!

Cheers,
Bruno

PS: As you can see I haven't posted too much yet and don't really know the editor that well, any ideas how I can keep the "key features" section cleaner? It looks really bad with all those spoilers…
Edited on 09 June 2019 - 07:24 PM
Bomb Bloke #2
Posted 07 August 2018 - 02:45 AM
I'd decrease the default space between tunnels from three to two, as you're potentially missing a lot of ore.

SpoilerRegarding formatting, you might consider named spoilers like these:

Automatic UpdateAs soon as I release a new update on pastebin, the program will update on next startup and notify you afterwards. All your variables will be saved.

[namedspoiler=Automatic Update]As soon as I release a new update on pastebin, the program will update on next startup and notify you afterwards. All your variables will be saved.[img]https://imagizer.imageshack.com/v2/800x600q90/922/f5zvpJ.png[/img][/namedspoiler]

Or lists such as these:
  • Throw away trash
  • Stable af:
    • gravel-proof
    • water-/lavaproof
    • mob-proof
    • wont crash when out of fuel
    • wont crash when materials (e.g. torches or chest) are missing
    • fuel = "unlimited" -proof

[list][*]Throw away trash
[*]Stable af:
[list][*]gravel-proof
[*]water-/lavaproof
[*]mob-proof
[*]wont crash when out of fuel
[*]wont crash when materials (e.g. torches or chest) are missing
[*]fuel = "unlimited" -proof[/list][/list]
BrunoZockt #3
Posted 07 August 2018 - 07:11 AM
I'd decrease the default space between tunnels from three to two, as you're potentially missing a lot of ore.

SpoilerRegarding formatting, you might consider named spoilers like these:

Automatic UpdateAs soon as I release a new update on pastebin, the program will update on next startup and notify you afterwards. All your variables will be saved.

[namedspoiler=Automatic Update]As soon as I release a new update on pastebin, the program will update on next startup and notify you afterwards. All your variables will be saved.[img]https://imagizer.imageshack.com/v2/800x600q90/922/f5zvpJ.png[/img][/namedspoiler]

Or lists such as these:
  • Throw away trash
  • Stable af:
    • gravel-proof
    • water-/lavaproof
    • mob-proof
    • wont crash when out of fuel
    • wont crash when materials (e.g. torches or chest) are missing
    • fuel = "unlimited" -proof
[list][*]Throw away trash
[*]Stable af:
[list][*]gravel-proof
[*]water-/lavaproof
[*]mob-proof
[*]wont crash when out of fuel
[*]wont crash when materials (e.g. torches or chest) are missing
[*]fuel = "unlimited" -proof[/list][/list]

Thanks a lot for your feedback!

space between tunnelsActually, the space between tunnels is another customizable option. You are right - if the area is being your limiting factor 2 Blocks of Space is the way to go, to garantie that every ore will be found. But the "loss" when using 3 Blocks of Space is -because most ores have a width greater than 1 Block - below 10% which in my opinion isn't worth the extra fuel already. Now, if the limiting factor is time, then 3 Blocks of Space is a lot more efficient. In the same amount of time the turtle finds around 130% of the ores it would with a space of 2 Blocks.

Formatting tipsThat helps me a lot! I will use this to improve my top post later.
SquidDev #4
Posted 07 August 2018 - 07:34 AM
Wow, this is a jolly cool program! I rarely go beyond "while true do turtle.forward() turtle.dig()", so am always impressed when people do fancy ore excavation programs.

I'd decrease the default space between tunnels from three to two, as you're potentially missing a lot of ore.
I seem to remember someone crunched the numbers ages ago and a gap of 6 is the most "efficient" in terms of a block:ore ratio. However, I guess there's an argument that this'll just be running in the background, so it's better to get maximum utilisation from the area as time isn't the bottleneck.
BrunoZockt #5
Posted 07 August 2018 - 08:37 AM
Wow, this is a jolly cool program! I rarely go beyond "while true do turtle.forward() turtle.dig()", so am always impressed when people do fancy ore excavation programs.
Thank you! ^_^/>
Bomb Bloke #6
Posted 07 August 2018 - 12:01 PM
However, I guess there's an argument that this'll just be running in the background, so it's better to get maximum utilisation from the area as time isn't the bottleneck.

In "plot based" world I'd agree, but now that's it's been mentioned, I do feel that time's more important. Under "normal" circumstances we have access to an effectively infinite area to mine in, but background process or not, we'll never have an infinite amount of time.
doctorwhofan92 #7
Posted 13 August 2018 - 03:00 AM
Would it be possible to make it so that the turtle auto-fills the walls/ceiling so that in the case of lava or water the 'hallway' is still usable by the player?
BrunoZockt #8
Posted 18 August 2018 - 12:42 AM
Would it be possible to make it so that the turtle auto-fills the walls/ceiling so that in the case of lava or water the 'hallway' is still usable by the player?
Hi, pls excuse the wait.
I actually had that on my features-list but removed it because I was too lazy and thought nobody would need it anyway. I mean the turtle is coming back so you shouldn't have to go in there ;)/>
However now that it's been requested I'll get coding :D/>
BrunoZockt #9
Posted 19 August 2018 - 03:57 PM
New Update!
Note that this update will be installed automatically if you've already dowloaded this program.

Features:
  • You can now choose to let the turtle build walls and ceiling to prevent the hallways from being flooded by water or lava.
  • If torches need to be placed, the turtle will now determine it's cardial direction at the beginning of digging.
  • When trash-option or chest-option is true, the turtle will now keep 1 Stack of cobblestone to place floor or walls, if selected.

Bug fixes:
  • There was a 50% chance (turtle heading north or south) that 50% of the torches (either on the right or the left crosstunnel) were lost. That is because torches are by default placed heading west if possible. The turtle will now determine where it is heading and adjust the way it places torches accordingly so that it never loses a single torch.
  • When in default settings 'chest' was set to 'none' there would be a slot for a chest anyways.
  • I missed two instances in my code that would cause a crash when no cobblestone was available. However the probability to hit this crash was soooo low that I'm sure nobody ever encountered it.
doctorwhofan92 #10
Posted 21 August 2018 - 05:22 PM
Hey I'm getting a 'OCM:2199: Expected Number' Error on one of my turtles also one of the options just says 'Nil'
BrunoZockt #11
Posted 22 August 2018 - 07:28 PM
Hey I'm getting a 'OCM:2199: Expected Number' Error on one of my turtles also one of the options just says 'Nil'
Hi, I'm sorry to hear that. However I'd need to know your Computercraft Version (written at the top-left of your screen) to help you.
BrunoZockt #12
Posted 22 August 2018 - 10:59 PM
Hey I'm getting a 'OCM:2199: Expected Number' Error on one of my turtles also one of the options just says 'Nil'
Hi, I'm sorry to hear that. However I'd need to know your Computercraft Version (written at the top-left of your screen) to help you.
Forget that, I know what happend. You didn't place your turtle in front of a wall/stone. That - or 1 cobblestone in the inventory - is required. However I hot fixed it now to also accept any other block. Easiest way around this, as I said, is to just place the turtle in front of a wall. I mean after all it's for mining right? So why even place it in open space?
Edited on 22 August 2018 - 09:00 PM
doctorwhofan92 #13
Posted 31 August 2018 - 03:25 AM
When the 'Build wall' option is set it isn't replacing lava with a block I think this is due to lava being in that space not it being air? also would it be possible to make it so that when chest is selected it doesn't have to be a vanilla chest because I'd prefer to put a resonant strongbox or a tesseract in it
BrunoZockt #14
Posted 03 September 2018 - 01:30 PM
When the 'Build wall' option is set it isn't replacing lava with a block I think this is due to lava being in that space not it being air? also would it be possible to make it so that when chest is selected it doesn't have to be a vanilla chest because I'd prefer to put a resonant strongbox or a tesseract in it
Thanks for reporting the Bug and the suggestion to implement other mod chests. I've already coded both but the next version will also implement automatic resuming which I am almost done with but there is still a bit of work to do.
The new version will probably be released within the next two weeks, you'll have to be patient until then :unsure:/>
doctorwhofan92 #15
Posted 13 September 2018 - 05:02 PM
Thanks! I LOVE your program it's the one I try to always use!
BrunoZockt #16
Posted 17 September 2018 - 08:29 PM
New Update! V2.6
Note that this update will be installed automatically if you've already dowloaded this program.

Features:
  • The program will now continue automatically after a server restart. To achieve this it is very important that there is always one torch available so that the turtle can orientate itself. Every command that needs to be executed is written to an extern file, which also takes up some disk space (very unlikely to exceed 10kb). So make sure that there is some file space left.
  • The program will also install [post='278255']my Startup Handler[/post] in 'startup' so that it can be automatically executed. Any file existing in 'startup' will be moved to 'old_startup' and called whenever there is no program that needs to be resumed.
  • The options 'chest' and 'enderchest' are now compatible with all the chests from the mods 'Iron chests' and 'Thermal Expansion'.
  • The path of the external files is now including your program name so that you could have multiple instances of the program on one turtle. The updater had to be modified aswell.
Bug fixes:
  • The 'place Walls'-option will now place walls in water or lava like it was originally supposed to (quite stupid mistake on my part).
Edited on 17 September 2018 - 08:01 PM
doctorwhofan92 #17
Posted 27 September 2018 - 11:25 PM
I hate being *That* guy but I'm getting an error when attempting to use an obsidian chest from iron chest mod. It isn't registering it as a chest

also getting the error "Unknown chunk:21: attempt to perform arithmetic on global 'k' (a nil value)"
Bomb Bloke #18
Posted 29 September 2018 - 11:42 AM
To get a certain chest to register, Bruno would need to know the internal name the turtle sees when it calls turtle.inspect() with the desired container in front of it. You might consider providing the names of all the other chests in the mod, too.
BrunoZockt #19
Posted 03 October 2018 - 07:24 PM
I hate being *That* guy but I'm getting an error when attempting to use an obsidian chest from iron chest mod. It isn't registering it as a chest also getting the error "Unknown chunk:21: attempt to perform arithmetic on global 'k' (a nil value)"
Unfortunately I don't have access to my PC and won't for the next week either, so I can't check this out. However there are only 2 possibilities:
1. You picked the wrong option. In the settings you have the possibility to choose between 'chest' and 'enderchest'. With any chest that saves it's inventory (e.g. Enderchest or tesseract) you'd have to pick 'enderchest'. With every other chest (e.g. normal chest or iron chest) you'd have to pick 'chest'. If I'm not mistaken that means you'd have to pick 'chest' for the obsidian chest to work.
2. I didn't include it. In that case all you can do for the time being is adding it to the table containing all the other chest IDs (I don't remember its name from the top of my head but it is definitly easy to find within the first 100 lines of code, since I've cleaned up the variables) and comment out the call of 'update()', which you can find within the last 50 lines of code. To add the ID to the master branch of the code (not before october 9th) , I'd need to know the item ID as Bomb Bloke mentioned.
Lastly, did the error message only occur trying to use the obsidian chest or at some other point? Because if it did happen at some other point, I could't do anything about it unless you could tell me when it crashed (The error message could mean anything). Perfect would be if you recreated the crash and sent me the folder "rom/database/..programname&#46;&#46;/resume", "programname" being the name you gave my program.
Written on mobile… I'm sorry.
Edited on 04 October 2018 - 07:07 AM
doctorwhofan92 #20
Posted 04 October 2018 - 10:35 AM
The crash appears while using a normal chest right after it begins mining. I'd say normally 3 blocks on the first shaft is when it normally appears.
exporta22 #21
Posted 05 October 2018 - 02:55 PM
i can't get it to work! may i done something wrong?


macan turbo s 0 60
doctorwhofan92 #22
Posted 08 October 2018 - 08:34 PM
i can't get it to work! may i done something wrong?


macan turbo s 0 60
If you look back you can see where this has been brought up. I'm sure he's doing his best to fix it :)/>
BrunoZockt #23
Posted 13 October 2018 - 07:21 PM
Hi, I'm sorry for the wait but it's my internet providers fault! -_-/>
I couldn't reproduce either one of your problems so I think that I messed something up with the automatic update.
Deleting the program and its external folder and reinstalling it could solve it.
Simply run this in your turtle:

delete [programName]
delete database/[programName]
pastebin get gkz5sgZ8 [programName]
Please reply wether it worked or not.
superbosser #24
Posted 08 December 2018 - 11:26 PM
I tried to run your program but I get OCM:61: attempt to call nil. I am using computercraft 1.7 and am running the tekkit legends pack. Thanks in advance
Bomb Bloke #25
Posted 09 December 2018 - 10:02 PM
Tekkit misconfigures ComputerCraft, enabling a debug option that should only be used by scripters under rare circumstances. In ComputerCraft.cfg, make sure disable_lua51_features is set to false.
d3ighty #26
Posted 12 February 2019 - 02:57 AM
For some reason i get this error message: https://i.imgur.com/E4m7Knt.png , im on enigmatica 2 non-expert with the newest CC:Tweaked. Can anybody help me? :)/>
Bomb Bloke #27
Posted 12 February 2019 - 09:03 AM
It looks like the script installs a few other files, but tries to load at least one of them before it could've possibly been downloaded. Guess Bruno didn't test a clean install with the latest build.

You may be able to work around this by grabbing the file manually:

pastebin get cR9vEiTc database/OCM/lang
d3ighty #28
Posted 12 February 2019 - 02:00 PM
Actually that worked , thanks for that! but now i got https://imgur.com/a/qOXGgfd,

i guess it just dont want to work for me :o/>

Edit: Its because i use the unlimited fuel mode.
Edited on 12 February 2019 - 08:51 PM
BrunoZockt #29
Posted 17 February 2019 - 02:34 PM
It looks like the script installs a few other files, but tries to load at least one of them before it could've possibly been downloaded. Guess Bruno didn't test a clean install with the latest build.

You may be able to work around this by grabbing the file manually:

pastebin get cR9vEiTc database/OCM/lang

Thank you for jumping in. It does indeed seem like I didn't test a clean install, which I'm very surprised by myself. I normally test thoroughly before posting to pastebin. What a fail…
However this is resolved now so that there should be no problems executing the program for the first time as long as there is a working internet connection and the http-setting turned on.
Edited on 03 April 2019 - 02:21 PM
Ramog #30
Posted 12 March 2019 - 12:34 AM
While using Computercraft version 1.79 I had the problem that the turtle wouldn't start any kind of chest filling precedure as soon as its inventory is full. It just keeps digging and throwing the items on the ground.
BrunoZockt #31
Posted 02 April 2019 - 10:45 PM
While using Computercraft version 1.79 I had the problem that the turtle wouldn't start any kind of chest filling precedure as soon as its inventory is full. It just keeps digging and throwing the items on the ground.
Sorry for taking so long. I had a lot on my plate and didn't have enough time to get into this.
The problem only occured with the normal chest option, right? If yes then I've found and fixed the mistake now. It should automatically update as always, please let me know if you're still having issues.

Thanks for your feedback and for using my program!
Mining_Pickaxe #32
Posted 09 May 2019 - 04:20 PM
Hi,
I tried using your script in ComputerCraft 1.8pr1 (MC 1.12.2) and added the enderchest to the avaible chest blocks (enderstorage:ender_storage), but when it filled up its inventory and goes to dumping the contents to the chest, it crashes with "Unknown chunk:2: attempt to compare nil with number".

Could you help me out with that?
UkeFox #33
Posted 14 May 2019 - 04:53 AM
While using Computercraft version 1.79 I had the problem that the turtle wouldn't start any kind of chest filling precedure as soon as its inventory is full. It just keeps digging and throwing the items on the ground.
Sorry for taking so long. I had a lot on my plate and didn't have enough time to get into this.
The problem only occured with the normal chest option, right? If yes then I've found and fixed the mistake now. It should automatically update as always, please let me know if you're still having issues.

Thanks for your feedback and for using my program!


The issue is still present. I also noticed an issue with the naming of the iron chests. You have them named IronChest:IronBlockChest when it should be IronChest:Iron_Chest. I cannot correct the issue myself because of how the program works. It refreshes the code anytime I start the program.
BrunoZockt #34
Posted 09 June 2019 - 07:53 PM
While using Computercraft version 1.79 I had the problem that the turtle wouldn't start any kind of chest filling precedure as soon as its inventory is full. It just keeps digging and throwing the items on the ground.
Sorry for taking so long. I had a lot on my plate and didn't have enough time to get into this.
The problem only occured with the normal chest option, right? If yes then I've found and fixed the mistake now. It should automatically update as always, please let me know if you're still having issues.

Thanks for your feedback and for using my program!


The issue is still present. I also noticed an issue with the naming of the iron chests. You have them named IronChest:IronBlockChest when it should be IronChest:Iron_Chest. I cannot correct the issue myself because of how the program works. It refreshes the code anytime I start the program.

To disable the automatic update, just comment out "update()" which can be found within the main() function at the bottom of the code.
I will look into this now, I got the names by inspecting the chests though, so unless the names have been changed it should work… been some time though

Hi,
I tried using your script in ComputerCraft 1.8pr1 (MC 1.12.2) and added the enderchest to the avaible chest blocks (enderstorage:ender_storage), but when it filled up its inventory and goes to dumping the contents to the chest, it crashes with "Unknown chunk:2: attempt to compare nil with number".

Could you help me out with that?

The enderchest from enderstorage should work unless it's name has been changed. Adding chests yourself wont work because of the program automatically getting the official version from pastebin at startup.
ovadex #35
Posted 08 July 2019 - 09:07 AM
The enderchest from enderstorage should work unless it's name has been changed. Adding chests yourself wont work because of the program automatically getting the official version from pastebin at startup.

It looks like that may have happened. In the script it's down as "EnderStorage:enderChest" but when I check the item id (F3+H) it's shown as "enderstorage:ender_storage"

Also when on normal chest mode it doesn't drop off when full. Just overflows and drops everywhere.

Love the program by the way. It's meticulous as far as getting the ores!
ovadex #36
Posted 10 July 2019 - 04:56 PM
It looks like the enderchest name might have changed at some point since the item id I see in game differs from what is in the script. in game it's shown as "enderstorage:ender_storage".

Love the prog aside from the fact it never seems to drop off in the chest.
ravensniper72 #37
Posted 18 July 2019 - 02:51 PM
When I run the program i can get past the update notification but i can't select any menu options. Help.
BrunoZockt #38
Posted 30 July 2019 - 10:32 PM
When I run the program i can get past the update notification but i can't select any menu options. Help.
Did you try using the arrow keys?
renjestoo #39
Posted 15 August 2019 - 11:55 AM
When I run the program i can get past the update notification but i can't select any menu options. Help.
Did you try using the arrow keys?

@BrunoZockt

I also can't get past the menu options after the update.
I tried WASD, Arrowkeys, left and right mousebuttons
I tried it in a normal turtle (I know… that doesn't work with touch)
and in an advanced turtle.. (I can check the "Dont show anymore" option)
after that, I click on "OK" and then the menu options don't work anymore.

I play in "Minecraft 1.14.4" and I use "cc-tweaked-1.14.4-1.84.0"

Hope you can help me with this information. If you need any other info, let me know.
Nicolay #40
Posted 24 August 2019 - 05:13 PM
Hello!

When trying to start the mining, I am getting "M:2503: attempt to call nil". I run 1.7.
BrunoZockt #41
Posted 06 September 2019 - 07:29 PM
It looks like the enderchest name might have changed at some point since the item id I see in game differs from what is in the script. in game it's shown as "enderstorage:ender_storage".

Love the prog aside from the fact it never seems to drop off in the chest.

Hi, I must have missed your comment, I'm sorry.
I just finished an hour of figuring out what you wrote me by myself, which annoys me a lot…
I will be changing the code to account for that change!
The dropping off thing seems like it needs some work and I really don't have the time at the moment. I'd be very happy however if somebody else could figure out what's wrong. The relevant function is called "NormalChest", remember to comment-out "update()".
As soon as I find the time I will look into this myself.
Thanks for your kind words!

When I run the program i can get past the update notification but i can't select any menu options. Help.
Did you try using the arrow keys?

@BrunoZockt

I also can't get past the menu options after the update.
I tried WASD, Arrowkeys, left and right mousebuttons
I tried it in a normal turtle (I know… that doesn't work with touch)
and in an advanced turtle.. (I can check the "Dont show anymore" option)
after that, I click on "OK" and then the menu options don't work anymore.

I play in "Minecraft 1.14.4" and I use "cc-tweaked-1.14.4-1.84.0"

Hope you can help me with this information. If you need any other info, let me know.

This one confuses me. If I'm not mistaken this can't be my fault because it's working perfectly fine on minecraft 1.7.10 and 1.12.1 (and likely everything in between).
My theory is that cc-tweaked changed up the keys API but I can't find proper documentation on this. Is there some cc-tweaked dev who has an idea?
When I find the time I'll fiddle around with this and try to find the issue, but if I have to choose between supporting official computercraft and cc-tweaked I'll stick to the official release, sorry.
SquidDev #42
Posted 07 September 2019 - 07:05 AM
My theory is that cc-tweaked changed up the keys API but I can't find proper documentation on this.
All the key codes changed in 1.13+, as Minecraft replaced LWJGL with GLFW, and trying to patch between the two systems would have been more error-prone. Just switch to using the keys API, rather than hard-coding numbers, and you should be fine.

Also worth noting that blocks no longer have metadata, so your facing detection code will no longer work - you should be able to use block states like in 1.8+.
Edited on 07 September 2019 - 05:08 AM
BrunoZockt #43
Posted 10 September 2019 - 08:24 PM
My theory is that cc-tweaked changed up the keys API but I can't find proper documentation on this.
All the key codes changed in 1.13+, as Minecraft replaced LWJGL with GLFW, and trying to patch between the two systems would have been more error-prone. Just switch to using the keys API, rather than hard-coding numbers, and you should be fine.

Also worth noting that blocks no longer have metadata, so your facing detection code will no longer work - you should be able to use block states like in 1.8+.

Thank you for the fast reply!
I knew metadata would bite me in the ass someday, I just didn't imagine it to be this way…
Resioku #44
Posted 02 December 2019 - 08:55 PM
Hi, I had this error pop up https://gyazo.com/3f53e338aeda3ae587e41213f2b7d47f
It filled its inv, placed the chest I supplied it and crashed like this. Any fixes?
PedroBarbosa #45
Posted 12 January 2020 - 04:26 AM
Hi, I had this error pop up https://gyazo.com/3f...7e41213f2b7d47f
It filled its inv, placed the chest I supplied it and crashed like this. Any fixes?

I have the same error, every time the turtle goes to clean inventory, can you please fix it? Thanks alot