←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[MC1.12+][Fork] CC: Tweaked

SquidDev's Photo SquidDev 24 Aug 2020

I pushed a release yesterday, but entirely forgot to write an update post about it. CC:T 1.91.0 isn't a big change, but there's a couple of minor improvements.
  • string.{pack,unpack,packsize} support. MCJack123 added support to Cobalt for the various string pack/unpacking functions from Lua 5.3. These behave similarly to Python's struct module, or PHP's pack/unpack - it allows you to easily pack binary data into strings, and unpack it again. Hopefully it'll make working with complex binary file formats (such as images, compressed files, etc...) a little easier.
  • Repeated string concatenation is now linear rather than quadratic. This won't have any major impact, just will mean code doing string concatenation within loops will run a little faster - in some pathological cases, textutils.serialize is 10x faster.
    I've done a little write up on how this works internally, if that's your sort of thing.
Many thanks to abby, MCJack123, neumond and R93950X for their PRs! Having other people help out makes things significantly easier.
Quote

Purple's Photo Purple 25 Oct 2020

I tried using a resource pack for code like you'd do in regular computercraft for this but they don't seem to work. As in the files just are not found by the turtle. So are there any instructions on how to do it for CCTweaked?
Quote

Lupus590's Photo Lupus590 26 Oct 2020

View PostPurple, on 25 October 2020 - 09:07 PM, said:

I tried using a resource pack for code like you'd do in regular computercraft for this but they don't seem to work. As in the files just are not found by the turtle. So are there any instructions on how to do it for CCTweaked?

What version of the game are you on? Resource packs changed into data packs at some point so depending on MC version you might need a data pack instead, The folder structure is the same for CC/CC:T but you have to put it in the data pack format and location.
Quote

Purple's Photo Purple 27 Oct 2020

I just moved from 12 to 14.4 14.4 But all my other resource packs work just fine. I mean, as far as I can tell the only difference is that you need to change "pack_format": 3 to "pack_format": 4 in the config. Am I missing something? The path is still: data\computercraft\lua\rom right?
Edited by Purple, 27 October 2020 - 11:54 AM.
Quote

SquidDev's Photo SquidDev 27 Oct 2020

View PostPurple, on 27 October 2020 - 11:52 AM, said:

I just moved from 12 to 14.4 14.4 But all my other resource packs work just fine. I mean, as far as I can tell the only difference is that you need to change "pack_format": 3 to "pack_format": 4 in the config. Am I missing something? The path is still: data\computercraft\lua\rom right?
There's a couple of changes:
  • The directory needs to be "data" instead of "assets" (looks like you've picked this up already)
  • Pack format version as you mention
  • It needs to be installed in the world's datapack folder, rather than the resource packs one.

There's an example pack at https://github.com/S...atapack-example, which might be worth consulting.
Edited by SquidDev, 27 October 2020 - 01:57 PM.
Quote

Purple's Photo Purple 29 Oct 2020

So it no longer works for all worlds but I have to install into each world individually? Wow, that sucks. Well thanks for the help. At least I can get it to work at all.
Quote

Lupus590's Photo Lupus590 29 Oct 2020

View PostPurple, on 29 October 2020 - 02:40 PM, said:

So it no longer works for all worlds but I have to install into each world individually? Wow, that sucks. Well thanks for the help. At least I can get it to work at all.

This mod might be a workaround: https://www.cursefor...global-datapack
Edited by Lupus590, 29 October 2020 - 03:32 PM.
Quote

Purple's Photo Purple 31 Oct 2020

Thanks. That helps.

Another random question. I just updated to the newest CCTweaked for 1.14 and I notice that every time I open a computer a hint of sorts pops up. Now at first these were helpful but they take up half the screen at times and thus they unfortunately got annoying really quickly. Is there a way to kill those? Or better yet toggle them so that I can turn them on occasionally (since I do keep running into new stuff) but not keep them on all the time when I just want to do quick work?

I just got a helpful hint from the hint system on how to do it. :)
Edited by Purple, 31 October 2020 - 10:37 AM.
Quote

Purple's Photo Purple 31 Oct 2020

still debuging.
Edited by Purple, 31 October 2020 - 11:29 AM.
Quote

SquidDev's Photo SquidDev 01 Nov 2020

View PostPurple, on 31 October 2020 - 09:49 AM, said:

I just got a helpful hint from the hint system on how to do it. :)

See, they are useful!
Quote

Purple's Photo Purple 16 Apr 2021

One note to everyone reading this in the future. Using CCTweaked and a datapack you no longer have to use OS.LoadAPI. It works automatically. Yes, the example content pack has an useful example code file that shows just this. But if you are stupid like me and don't look at that file now you know.
Quote