Jump to content




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


78 replies to this topic

#61 SquidDev

    Frickin' laser beams

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

Posted 08 March 2019 - 10:13 PM

It's been another six months since I touched my website, which means it must be time for another blog post! I thought it would be fun (for me, probably not for you) to write about some of the changes made to CC's internals in the previous and next CC:T versions. I'm afraid it's rather long, and rather dense - there's not very many things you can take images when discussing internals.

One thing I would like to highlight though is this issue about documentation. I'd really like to rethink how CC's APIs are documented, in an effort to keep up-to-date. I've put together a little (massive) proposal, but I may be over-complicating things. If you have any ideas, suggestions, or just feel like it, do comment!

On a side note, we just smashed past 450k downloads, largely due to our inclusion within the FTB Ultimate Reloaded pack. Obviously the vast majority of people aren't actually using CC:T at all, but it's definitely nice to see some mainstream packs adopting it.

Edited by SquidDev, 09 March 2019 - 02:55 PM.


#62 Bomb Bloke

    Hobbyist Coder

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

Posted 09 March 2019 - 01:27 PM

FTP lol. You've got downloads on the brain. ;)

Long since past time that CC:T made it into a mainstream pack, though.





#63 SquidDev

    Frickin' laser beams

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

Posted 02 April 2019 - 08:36 PM

I've just pushed another release of CC:Tweaked to CurseForge, with the ever-exciting version number of 1.82.0. What's more exciting is the changelog though. It's a bit unwieldy, so I'm only going to go through the hightlights rather than milking it like I normally do. You can always read the whole thing if you like.

Firstly, may thanks to the people who have contributed to this release: absolument, Ale32Bit, daelvn, nothjarnan, hydraz, Luca0208 and WIlma456. If people have suggestions, ideas or code, please do contribute. I'd also recommend keeping an eye on the issue tracker, as there's always things I'd like feedback on.
  • Computers may be preemptively interrupted if they run for a long time. This shouldn't result in any noticeable change in behaviour, but means badly/malicious computers have less of an impact on other computers.
  • Computers are limited to how much server time they can use each tick, hopefully reducing the impact a computer can have on a server's TPS. This may cause issues if you were queuing a lot of tasks (say, lots of calls to commands.execAsync). If you encounter issues, please let me know.
  • Massively improve JEI integration. You can now get the recipe and usage of any upgraded turtle or pocket computer. On a related note, JEI will now label upgraded turtles/pocket computers as belonging to whatever mod which registered its upgrade.
  • MCMultipart support for wireless and ender modems. This is dubiously useful, but now means you can decorate modems with Chisel and Bits.
  • Several improvements to pastebin, including detection for when you trigger the spam protection mechanism and handling of running pastebin get with a URL instead.
As you may be able to tell, there's been a lot of under-the-hood changes again this release. While everything has been pretty well tested, I'm sure some things have slipped through the hoop. Please file a bug if you if you find anything suspect!

Edited by SquidDev, 02 April 2019 - 08:38 PM.


#64 SquidDev

    Frickin' laser beams

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

Posted 31 May 2019 - 12:48 PM

It's Friday, it's Five to Five, and it's Crackerjack CC:Tweaked release time! I'm afraid CC:Tweaked 1.83.0 hasn't got any especially exciting changes, just a few QoL improvements to CraftOS and CC:Tweaked.

Many thanks to XuyuEre, hydraz and JakobDev (aka Wilma456) for their contributions this release! I won't go over every change, but here's a couple of highlights:
  • Add os.date, and handle passing datetime tables to os.time, making them largely compatible with PUC Lua.
  • rm and mkdir accept multiple arguments. (hydraz, JakobDev)
  • Rework rendering of in-hand pocket computers, making them closer to computer GUIs than the pocket computer item.
  • Prevent rendering of a bounding box on a monitor's screen.
  • Clean up the Lua type-checking code, shifting it into a helper method. As a result, error messages now include the function name where known (for instance, sleep(false) will error with "bad argument #1 to 'sleep' (expected number, got boolean)"). Hopefully this makes it even easier to work out what's going wrong!
On a side note, if you're on Windows 10, you might be interested in CC:Tweaked (Bedrock Edition). It's a silly little port I did of computers to the new addon system Mojang and Microsoft are working on. It's very slow and largely unusable, but kinda cool none-the-less.

Edited by SquidDev, 24 June 2019 - 07:35 AM.


#65 SquidDev

    Frickin' laser beams

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

Posted 15 June 2019 - 08:45 AM

Just a small note to say that I've updated CC:Tweaked to run on Minecraft Forge for 1.14.2. Both Forge and CC:T are in early days of updating, so I'm sure there's plenty of bugs, but it seems pretty stable so far.

#66 SquidDev

    Frickin' laser beams

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

Posted 26 June 2019 - 07:09 AM

Just done another update to Minecraft 1.14.3. No major changes, just lots of bug fixes - thank you to everyone's who has helped test and reported things!

#67 blunty666

  • Members
  • 79 posts

Posted 05 July 2019 - 12:39 PM

Hey SquidDev, you're doing great work keeping CC alive, it's really appreciated!

I've not been able to get on to the new computercraft.cc wiki / forum for a few days? Is it down at the moment?

#68 Lupus590

  • Members
  • 2,007 posts
  • LocationUK

Posted 05 July 2019 - 12:56 PM

It is down at the moment, it's the same outage that hit switch craft a while ago(which switch craft is still recovering from, not 100% yet). You can keep yourself updated on the switch craft discord https://discordapp.c...850498060484611

Edited by Lupus590, 05 July 2019 - 01:00 PM.


#69 blunty666

  • Members
  • 79 posts

Posted 05 July 2019 - 02:29 PM

View PostLupus590, on 05 July 2019 - 12:56 PM, said:

It is down at the moment, it's the same outage that hit switch craft a while ago(which switch craft is still recovering from, not 100% yet). You can keep yourself updated on the switch craft discord https://discordapp.c...850498060484611
Ah ok thanks, will keep an eye out there for updates!

#70 SquidDev

    Frickin' laser beams

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

Posted 04 August 2019 - 03:31 PM

Just pushed CC:Tweaked 1.84.0, which fixes a fair few bugs, and adds a couple of minor new features:

Changelog (full changelog on GitHub)
  • Improve validation in rename, copy and delete programs
  • Add window.getLine - the inverse of blit
  • turtle.refuel no longer consumes more fuel than needed
  • Add "cc.expect" module, for improved argument type checks
  • Mount the ROM from all mod jars, not just CC's
Many thanks to JakobDev, Lignum, LiquidObsidian and powerboat9 for their contributions this month. As always, please do check out the list of active pull requests (and issues) to have a say in the upcoming changes to the mod!

#71 SquidDev

    Frickin' laser beams

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

Posted 04 October 2019 - 06:35 PM

I've made another CC: Tweaked release: 1.85.0. This contains a couple of minor improvements and a fair few bug fixes.

Changelog (see full 1.12.2/1.14.4 changelog)
  • Window.reposition now allows changing the redirect buffer
  • Add cc.completion and cc.shell.completion modules
  • Fix several turtles' GUIs desyncing after moving.
Just as a bit of a status update for people, I'm entering the last year if university right now, and so have substantially less time and energy to spend on CC-related projects than I might like. This doesn't mean development will stop, but sadly both new features and bug fixes will be slower to materialise. As always, if people want to help out - either with the mod itself, or any related projects/tooling, that would be very much appreciated!

#72 SquidDev

    Frickin' laser beams

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

Posted 24 December 2019 - 07:04 PM

Merry Christmas everyone, it's time for (hopefully) the last CC:T update of the decade:

Posted Image


Like many recent updates, there's not a lot of big changes, but a couple of nice small ones:
  • The read function now allows changing the cursor position using the mouse.
  • Add support for PATCH and TRACE HTTP methods (jaredallard)
  • CraftTweaker support: This is currently relatively rudimentary, but allows you remove turtle upgrades, and add new tools to turtles. For instance, the following script replaces the default mining upgrade with one crafted with wood:
    dan200.computercraft.turtle.removeUpgrade(<minecraft:diamond_pickaxe>);
    dan200.computercraft.turtle.addTool("minecraft:diamond_pickaxe", <minecraft:wooden_pickaxe>, <minecraft:diamond_pickaxe>);
    
    It's not a lot, but hopefully should be useful for pack makers (and can be extended in the future should it prove useful)!

Anyway, all the best to everyone in the new year, and here's to another year of CC(:T).

PS: Just as an update on Minecraft 1.15.x, I've started work, but currently waiting on MCP mappings to be a little more up-to-date before getting too much in to things. It doesn't look too difficult an update though, so hopefully should appear relatively quickly after that though!

Edited by SquidDev, 24 December 2019 - 07:06 PM.


#73 SquidDev

    Frickin' laser beams

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

Posted 24 January 2020 - 08:50 AM

I've just made an initial release of CC: Tweaked for Minecraft 1.15.2, which can be downloaded from CurseForge.

I will stress that this release is alpha quality, and so is missing several features and is most likely rife with bugs. There's also a couple of other (minor) changes I'd like to make internals before making a stable release, so some things may break between releases too. That said, it should still be usable for casual gameplay so please do use it (and report the inevitable bugs).

Changelog
  • Update to Minecraft 1.15
  • Rewrite monitor rendering to use VBOs instead of call lists.
Please note the current features have been temporarily removed until Forge's support for them is fully updated:
  • Map rendering for pocket computers and printouts
  • Item frame rendering for printouts
  • Custom block outlines for monitors and cables/wired modems
  • Custom breaking progress for cables/wired modems


#74 SquidDev

    Frickin' laser beams

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

Posted 07 February 2020 - 01:03 PM

Happy February everyone, just thought now would be an opportune time to post a couple of things about CC: Tweaked.
  • Firstly, I wrote a while back about documenting CC: Tweaked, and I'm happy to say that some work has been done, a year after the discussion started.

    I'm currently hosting a very WIP documentation site at tweaked.cc - if people have time to have a read through it, check things make sense, or even contribute documentation I'd really appreciate it. There's a PR on the GitHub repository, if you have any comments or just fancy finding out more.
  • Plethora recently hit 1 million downloads, and CC: Tweaked isn't far of 3 million. There is absolutely no meaning to these numbers, but it makes me feel fuzzy inside :). Thank you to everyone who has used the mod, reported issues, or even contributed code! ♥
  • I'm planning on making several changes to the Lua VM in the next few weeks, to hopefully bring it more inline with PUC Lua (i.e. standard Lua), as well integrate a couple of Lua 5.2/5.3 features. That said, there are a couple of changes which may break things - if people are willing to help test, please ding me on GitHub/Discord/IRC.
Finally, I leave you with an FPS comparison of monitors on 1.12 and 1.15:
Posted Image

#75 SquidDev

    Frickin' laser beams

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

Posted 23 April 2020 - 09:37 AM

I'm currently doing releases for CC:Tweaked 1.87.0 - hopefully they'll be done by the time you read this! There's lots of (dubiously) exciting changes, but here are the big ones:

Documentation!
A little over a year ago, I wrote a little bit about the current state of CC:T documentation, and my plans for it. While both the cc.info and cc.cc wikis are fantastic, as a developer they're hard to maintain and keep in sync with the current state of the project.

As of this release, a good portion of CraftOS's has is documented using inline doc comments, which exported to https://tweaked.cc/. While there's a lot of functionality missing from the site right now (and the documentation is a long way from complete), hopefully it's still a useful reference.

Monitor rewrite
For the 1.15 update, I moved monitors over to use VBOs, which resulted in a dramatic FPS boost. These changes have now been backported to 1.12 and 1.14, with several other optimisations. This allows the us to render the 960x360 image from the previous post at about 95fps, compared with 7fps on the previous renderer. I will stress that this is very much an edge case - updating the monitor is still slow. There's some work being done by others to optimise both network and GPU traffic of monitor rendering, so hopefully we'll get even more improvements in the future!

Lua VM changes
There's been a couple of changes to the Lua VM, to bring it closer in line with PUC Lua, and backport several 5.2/5.3 features:
  • The __len metamethod may now be used by tables.
  • Add \z, hexadecimal (\x00) and unicode (\u0000) string escape codes.
  • Add utf8 lib.
  • Mirror Lua's behaviour of tail calls more closely. Native functions are no longer tail called, and tail calls are displayed in the stack trace.
  • table.unpack now uses __len and __index metamethods.
  • Parser errors now include the token where the error occurred.
Other highlights
  • Added fs.getAttributes: A bit like stat, this allows you fetch file size, type and creation/modification times.
  • Added textutils.unserializeJSON. This works with both standard JSON, and stringified-NBT, like you may receive from the output of commands.
  • The settings API now allows "defining" settings, along with a description and default value. This means that the .settings file now only stores the changed values.
  • The menu bar on paint and edit can now be clicked on using the mouse! This allows you to paint and save on monitors (@JakobDev)
  • The Lua REPL's pretty printer has been rewritten. It now supports functions and recursive tables.
As always the full changelog can be found on GitHub. This release touches a lot of CraftOS in subtle ways so there's likely to be breakages. Please file a bug if so!

Edited by SquidDev, 23 April 2020 - 09:40 AM.


#76 SquidDev

    Frickin' laser beams

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

Posted 16 May 2020 - 09:19 AM

I've just pushed a new release of CC:T (1.88.0), with a couple of new features and changes:

Even more monitor optimisations
As mentioned in the previous post, the monitor renderer was recently rewritten to use VBOs. Using some suggestions from Lemmmy and Lignum on GitHub, I've added an alternative backend using texture buffers. There's some numbers and more description on my website, but this should eliminate most monitor FPS lag - I'm able to render 120 full-sized monitors at 40-50 fps on laptop.

I've also changed now monitor contents is sent over the network, which should halve the bandwidth used. It's still pretty terrible (120 monitors changing at once sends a 3MB packet), but still a little better!

If you're using optifine with shaders, you may have some issues - I'd recommend switching back to the VBO renderer in the config.

Preserving computer IDs
Computers and turtles now preserve their ID (and thus their files) when broken. This is probably a somewhat contentious change, so apologies. However, it's something I've mulling about for a long time now, and after discussing with a few people I think it's worth it - it's definitely a major point of confusion for people starting off with the mod.

Other highlights
  • Add peripheral.getName, which returns the name of a wrapped peripheral.
  • Treasure disks have been missing since Minecraft 1.8.9 (or rather, they've no longer spawned in chests). As of 1.15, this functionality has been moved to an external datapack - just add it to your datapacks folder!
As always, the full changelog can be found on GitHub.

Edited by SquidDev, 16 May 2020 - 09:19 AM.


#77 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,459 posts

Posted 20 May 2020 - 02:18 AM

View PostSquidDev, on 16 May 2020 - 09:19 AM, said:

Preserving computer IDs
Computers and turtles now preserve their ID (and thus their files) when broken. This is probably a somewhat contentious change, so apologies. However, it's something I've mulling about for a long time now, and after discussing with a few people I think it's worth it - it's definitely a major point of confusion for people starting off with the mod.

Really, this change was probably due in the same release that allowed us to access computers' local storage when placed in a disk drive.

#78 SquidDev

    Frickin' laser beams

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

Posted 16 June 2020 - 08:04 AM

CC:T 1.89.0 is currently in the process of being released, so hopefully should be on CurseForge by the time you read this. There's not many major changes here, but a couple of things of note:
  • We've rewritten how monitor changes are sent to the client. Data is now gzipped, which should significantly reduce bandwidth usage. There's now also a config option, to limit how many monitors a client will receive in a single tick. This should make it much harder to abuse monitors.
  • turtle.inspect and turtle.getItemDetails now include the tags the inspected block/item has (Minecraft 1.14.4+ only).
As some of you may know, Minecraft 1.16 is getting ready for release. As always, I plan to update to that once Forge is ready. I will probably be dropping support for Minecraft 1.14.4 when this happens, and possibly making 1.15.2 the primary development version - meaning 1.12.2 will not be receiving any new features. Obviously nothing is set in stone, but handling 3 Minecraft versions is a little tiring!

Edited by SquidDev, 16 June 2020 - 08:11 AM.


#79 SquidDev

    Frickin' laser beams

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

Posted 22 June 2020 - 08:24 AM

For those people who are interested, I've setup a weblate instance for CC: Tweaked. This allows people to contribute translations without having to go through the faff of forking and creating a PR, as well as making the translation process itself much easier!

We've now got a fair few translations which are complete (or very close), so massive thank you to those who have contributed! If your language is incomplete (or not there at all), I'd appreciate any and all help (as well as any feedback on how well the system works).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users