Jump to content




[MC1.12][Fork] CC: Tweaked


70 replies to this topic

#21 Dreossk

  • Members
  • 21 posts

Posted 13 June 2018 - 12:19 AM

It works indeed now. Thanks!

#22 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 09 July 2018 - 08:05 PM

Just pushed another version of CC:Tweaked (1.80pr1.7 for those people who, like me, have lost track). There's no major changes, just a couple of QOL improvements:


Fancy rendering of printouts
I've rewritten a large portion of printed pages in an attempt to make them look a little bit more sane. When you've got a large number of pages, they'll have a bit more of a "curl", which in my opinion looks much better. As you may have noticed from the screenshot, you can also hold them in-hand and place them in item frames, though this does not allow you to read beyond the first page.

I'm still not entirely happy with how they look, so if people have any opinions do let me know on the PR.

Changed turtle block breaking
This was more out of necessity rather than desire, but I've rewritten how turtles break blocks to more closely match how players do it. This should mean there's less bugs, however there are a couple of side effects. Most notably, breaking a chest will deposit the items inside the turtle (if there's room) instead of leaving them on the ground.

.getNameLocal
Wired modems now provide a method which allows you to get the name of this computer on the wired network, effectively a pair of .getNamesRemote. This is mostly of interest to people (ab)using Plethora's transfer system, though I'm sure there are other uses of it too. I'm not entirely settled on the name, so suggestions are welcome!

Minor fixes
  • Improve formatting of /computercraft when run by a non-player.
  • Fix pocket computer terminals not updating when being held.
  • Fix a couple of minor blemishes in the GUI textures.
  • Fix sign text not always being set when placed.
  • Cache turtle fakeplayer, hopefully proving some minor performance improvements.


#23 Ta©ti_Tac0Z

  • Members
  • 59 posts

Posted 16 July 2018 - 07:20 PM

how does this work: "Websocket support in the HTTP library"?

#24 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 16 July 2018 - 07:37 PM

View PostTa©ti_Tac0Z, on 16 July 2018 - 07:20 PM, said:

how does this work: "Websocket support in the HTTP library"?
https://github.com/S...ki/http-library

#25 Ta©ti_Tac0Z

  • Members
  • 59 posts

Posted 23 July 2018 - 10:31 PM

View PostSquidDev, on 16 July 2018 - 07:37 PM, said:

View PostTa©ti_Tac0Z, on 16 July 2018 - 07:20 PM, said:

how does this work: "Websocket support in the HTTP library"?
https://github.com/S...ki/http-library

define "remote server"

#26 CLNinja

  • Members
  • 191 posts

Posted 24 July 2018 - 12:57 AM

View PostTa©ti_Tac0Z, on 23 July 2018 - 10:31 PM, said:

View PostSquidDev, on 16 July 2018 - 07:37 PM, said:

View PostTa©ti_Tac0Z, on 16 July 2018 - 07:20 PM, said:

how does this work: "Websocket support in the HTTP library"?
https://github.com/S...ki/http-library

define "remote server"

...A server... that isn't local...

#27 Ta©ti_Tac0Z

  • Members
  • 59 posts

Posted 25 July 2018 - 09:02 PM

View PostCLNinja, on 24 July 2018 - 12:57 AM, said:

View PostTa©ti_Tac0Z, on 23 July 2018 - 10:31 PM, said:

View PostSquidDev, on 16 July 2018 - 07:37 PM, said:

View PostTa©ti_Tac0Z, on 16 July 2018 - 07:20 PM, said:

how does this work: "Websocket support in the HTTP library"?
https://github.com/S...ki/http-library

define "remote server"

...A server... that isn't local...

... yes i know that thank you but any "spesific" type of remote server (what protocal is perhaps a better term)

#28 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 25 July 2018 - 09:09 PM

View PostTa©ti_Tac0Z, on 25 July 2018 - 09:02 PM, said:

... yes i know that thank you but any "specific" type of remote server (what protocol is perhaps a better term)
It just works with any server which supports HTTP upgrade/the websocket protocol. I'm afraid I'm rather confused what you're asking for,

Edited by SquidDev, 25 July 2018 - 09:09 PM.


#29 Ta©ti_Tac0Z

  • Members
  • 59 posts

Posted 27 July 2018 - 03:52 PM

yes me two so both the http and the http.socket table then does the same???

#30 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 28 July 2018 - 08:37 PM

As you may be aware, Minecraft 1.13 was released not long ago. While a version of Forge is probably several months away (due to the large amount of refactoring they are doing), I thought it'd be worth getting on with some refactoring of my own in order to prepare for the update.

You can see my progress on the PR - I've been trying to write some update posts as I'm going along, to try to explain the changes and rationale behind them. If people have any thoughts on the whole thing, or would be willing to help me test things, do get in touch!

#31 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 29 July 2018 - 05:02 AM

Yeah, I noticed GamePedia was suddenly flooded with footnotes saying "1.13 is different". Heck, even the bulk of my Command Computer scripts are certain to go splat, and not just due to simple matters of syntax. I'm guessing 1.12.2 will be well established as another 1.7.10 by the time Forge updates, and once again many modders will stay behind.

The logic behind "the Minecraft side of things" really isn't my field, but certainly I can test.

#32 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 16 August 2018 - 08:31 PM

So it's been a couple of weeks since the above post and I thought I'd post a status update (and beg for help, but we'll get onto that).

As a little bit of background, Minecraft 1.13 introduced an awful lot of changes in how Minecraft functions internally. As this means some features of CC will need to be restructured, it seemed as good a time as any to go through the mod and refactor some elements. ComputerCraft is a relatively old mod, and has been through a lot of Minecraft versions. Consequently, there's a lot of code which once was "the only way to do it", but now is strongly discouraged.

One of the biggest changes MC 1.13 introduced was "the flattening". This effectively removes block metadata and item damage, encouraging people to split things into separate blocks. For instance, almost all peripherals used to be stored under one block, some storing rotation information in block damage, others in NBT. The flattening allows (well, requires) us to split this into separate blocks - meaning we can simplify an awful lot of code.

The result of this is a mod which is about 3k LOC smaller (about 7% of the mod), with substantially simpler code and much less indirection. Oh, and an awful lot of bugs. That's where you come in:

While I have done some pretty thorough testing I can guarantee I have missed things. If you'd be willing to devote some time either to explicitly testing the changes, or just running the modified version of a mod in a testing world it would be much appreciated. I've put some instructions on how to go about this on the associated PR.

#33 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 23 August 2018 - 05:01 PM

I've just noticed (as if I haven't been monitoring for the last few days) that we've hit 10k downloads on CurseForge. While downloads isn't really an indication that people are using the mod (80% of downloads have come from a single pack) it's as good a benchmark as any and so is cause for celebration.

Party! Party!

I'd like to thank everyone who has contributed to both CC and CC:Tweaked over the last 15 months. It's been a fantastic journey to see the mods progress from something which barely functioned in 1.9, to today's 1.12.2 mod, with a whole host of features I never thought I'd see. Special shoutout to apemanzilla, who only today found and fixed a bug in turtle placing!

Edited by SquidDev, 23 August 2018 - 05:03 PM.


#34 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 25 August 2018 - 10:10 AM

I've just pushed a new version of CC:Tweaked (with the glorious version number of 1.80pr1.8). It should show up on CurseForge in the next few hours, but until then, here's a snapshot of the changes:

Changes from the last CC:Tweaked release
  • Bump Cobalt version
    • Default to using little endian in string.dump
    • Remove propagation of debug hooks to child coroutines
    • Allow passing functions to debug.getlocal, al-la Lua 5.2
  • Add Charset support for bundled cables
  • /computercraft commands are more generous in allowing computer selectors to fail.
  • Remove bytecode loading disabling from bios.lua.
Minor fixes
  • Fix stack overflow when using turtle.place with a full inventory (thank you to apemanzilla for finding and fixing this)
  • Fix in-hand printout rendering causing visual glitches.
As always, a massive thank you to everyone who has helped test the mod and reported bugs since the last release.

#35 rowas

  • Members
  • 6 posts

Posted 05 September 2018 - 02:33 PM

View PostSquidDev, on 25 August 2018 - 10:10 AM, said:

I've just pushed a new version of CC:Tweaked (with the glorious version number of 1.80pr1.8). It should show up on CurseForge in the next few hours, but until then, here's a snapshot of the changes:

Changes from the last CC:Tweaked release
Bump Cobalt version
Default to using little endian in string.dump
Remove propagation of debug hooks to child coroutines
Allow passing functions to debug.getlocal, al-la Lua 5.2
Add Charset support for bundled cables
/computercraft commands are more generous in allowing computer selectors to fail.
Remove bytecode loading disabling from bios.lua.
Minor fixes
Fix stack overflow when using turtle.place with a full inventory (thank you to apemanzilla for finding and fixing this)
Fix in-hand printout rendering causing visual glitches.
As always, a massive thank you to everyone who has helped test the mod and reported bugs since the last release.

Squid, So glad to see someone pushing the mod forward.
I've wanted to get back into Minecraft for a while, and I was worried that I wouldn't be able to program turtles again.
The latest update you pushed out, is it compatible with 1.13? Or is that still to come?

Edited by rowas, 05 September 2018 - 02:34 PM.


#36 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 05 September 2018 - 04:01 PM

View Postrowas, on 05 September 2018 - 02:33 PM, said:

The latest update you pushed out, is it compatible with 1.13? Or is that still to come?
It's being worked on, but is still a way off. Forge, the modding framework that most mods use (CC included) is in the process of being ported and so we may still be a month away.

#37 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 24 October 2018 - 12:19 PM

It''s been a while since the last update (wow, almost two months!), but I'm happy to announce a new release with an abundance of features and bug fixes. As always, you can download it from CurseForge (well, you will be able to when they've finished reviewing it).

The biggest change in this release is that I've rewritten how file handles are implemented, meaning they're now backed by ByteChannels instead of streams. This may seem largely cosmetic, but means we can now add seeking to binary files! In line with this, I've also rewritten the io library to more accurately emulate PUC Lua's version of it. While this should be largely compatible with the previous implementation, there is a risk of breaking existing programs - let me know if you find any problems.

I'd also like to give a shoutout to Vexatos for providing a German translation, and to gollark (aka osmarks) for finding and fixing a bug in the receive program. Contributions to both CC and CC:T are always welcome!

In other news, there's been very little progress on the 1.13 update. Forge's update process has taken longer than I was expecting, and most of the major contributors are rather burned out, so I'm afraid I can make no promises when it'll be ready.

In closing, CC:T has recently hit 40k downloads, which is a rather exciting milestone. Truth be told, almost all of those downloads come from one pack, but if it means greater exposure to CC/CC:T, I'm really not going to grumble! And no, I'm not mad at all that Plethora is much older and has still has fewer downloads.

Changes from the last CC:Tweaked release
  • Add German translation (Vexatos)
  • Add .getCursorBlink to monitors and terminals.
  • Allow sending binary messages with websockets.
  • Extend fs and io APIs
    • io should now be largely compatible with PUC Lua's implementation (:read("n") is not currently supported).
    • Binary readable file handles now support .readLine
    • Binary file handles now support .seek([whence: string[, position:number]]), taking the same arguments as PUC Lua's method. You can find out more on the CC:T wiki.
Minor fixes
  • Fix repeat program crashing when malformed rednet packets are received (gollark/osmarks)
  • Reduce risk of deadlock when calling peripheral methods.
  • Fix speakers being unable to play modded sounds.


#38 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 24 October 2018 - 07:03 PM

Just updated the CC:T version of CCEmuX to 1.80pr9 (just launch it and restart to update), which allows me to do a nice side-by-side comparison of the old and new io library:
Posted Image

Also a fantastic way to show off some of mbs' fancy pretty-printing features :).

#39 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 25 October 2018 - 12:07 AM

View PostSquidDev, on 24 October 2018 - 12:19 PM, said:

The biggest change in this release is that I've rewritten how file handles are implemented, meaning they're now backed by ByteChannels instead of streams. This may seem largely cosmetic, but means we can now add seeking to binary files!

Huh, I'll have to look into these "ByteChannel" things. I've just been using skip/mark/reset to "seek" through streams, and it'd be great to be able to do it "properly".

One of the good things about Java is that there's a class for everything. One of the bad things about Java is that there's a class for everything.

View PostSquidDev, on 24 October 2018 - 07:03 PM, said:

Just updated the CC:T version of CCEmuX to 1.80pr9 (just launch it and restart to update), which allows me to do a nice side-by-side comparison of the old and new io library:

What do the "file" thingies refer to?

#40 SquidDev

    Frickin' laser beams

  • Members
  • 1,409 posts
  • LocationDoes anyone put something serious here?

Posted 25 October 2018 - 11:20 AM

View PostBomb Bloke, on 25 October 2018 - 12:07 AM, said:

One of the good things about Java is that there's a class for everything. One of the bad things about Java is that there's a class for everything.
Yeah, I think these came in around the same time as the whole "non-blocking IO" code, which would have been Java 6. There's some very nice features (especially the file system abstraction), but it's not the most intuitive to use.

View PostBomb Bloke, on 25 October 2018 - 12:07 AM, said:

What do the "file" thingies refer to?
It's just a table with a __tostring metamethod - I'm mostly doing it as that is what "actual" Lua does. stdout and stderr are just writable streams (though stderr writes in red al-la printError). stdin is just a wrapper for read, though apparently is somewhat broken.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users