443e0f8f76
FileSystemMount was originally added to allow using ReadableByteChannels instead of InputStreams. However, as zip files do not allow seeking, there is no benefit of using them over the original JarMount (which we need to preserve for backwards compatibility). Instead of maintaining two near-identical mounts, we remove the FileSystemMount and rewrite the JarMount implementation with several improvements: - Rewrite the jar scanning algorithm to be closer to 1.13+'s data pack mount. This means we no longer require the jar file to have directories before the file (though this was not a problem in practice). - Add all JarMounts to a ReferenceQueue, closing up the ZipFile when they have been garbage collected (fixes #100). - Cache the contents of all files for 60 seconds (with some constraints on size). This allows us to seek on ROM files too (assuming they are small), by reading the whole thing into memory. The cache is shared across all mounts, and has a 64MiB limit, and thus should not have an adverse impact on memory. |
||
---|---|---|
.github | ||
gradle/wrapper | ||
src | ||
.editorconfig | ||
.gitignore | ||
.luacheckrc | ||
.travis.yml | ||
build.gradle | ||
codeStyleSettings.xml | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
LICENSE-luaj | ||
logo.png | ||
README.md | ||
settings.gradle |
CC: Tweaked is a fork of ComputerCraft which aims to provide earlier access to the more experimental and in-development features of the mod. For a more stable experience, I recommend checking out the original mod.
What?
CC: Tweaked (or CC:T for short) does not aim to create a competing fork of ComputerCraft, nor am I planning to take it in in a vastly different direction to the original mod. In fact, CC:T aims to be a nurturing ground for various features, with a pull request against the original mod being the end goal.
CC:T also includes many pull requests from the community which have not yet been merged, offering a large number of additional bug fixes and features over the original mod.
Features
CC: Tweaked contains all the features of the latest alpha, as well as numerous fixes, performance improvements and several additional features. I'd recommend checking out the releases page to see the full changes, but here's a couple of the more interesting changes:
- Replace LuaJ with Cobalt.
- Allow running multiple computers at the same time.
- Websocket support in the HTTP library.
- Wired modems and cables act more like multiparts.
- Add map-like rendering for pocket computers and printed pages/books.
- Adds the
/computercraft
command, offering various diagnostic tools for server owners. This allows operators to track which computers are hogging resources, turn on and shutdown multiple computers at once and interact with computers remotely. - Add full-block wired modems, allowing one to wrap non-solid peripherals (such as turtles, or chests if Plethora is installed).
- Extended binary file handles. They support file seeking, and reading new lines, allowing full (and accurate)
emulation of the standard Lua
io
library.
Relation to CCTweaks?
This mod has nothing to do with CCTweaks, though there is no denying the name is a throwback to it. That being said, several features have been included, such as full block modems, the Cobalt runtime and map-like rendering for pocket computers.
Contributing
Any contribution is welcome, be that using the mod, reporting bugs or contributing code. If you do wish to contribute code, do consider submitting it to the ComputerCraft repository first.
That being said, in order to start helping develop CC:T, you'll need to follow these steps:
- Clone the repository:
git clone https://github.com/SquidDev-CC/CC-Tweaked.git && cd CC-Tweaked
- Setup Forge:
./gradlew setupDecompWorkspace
- Test your changes:
./gradlew runClient
(or run theGradleStart
class from your IDE).
If you want to run CC:T in a normal Minecraft instance, run ./gradlew build
and copy the .jar
from build/libs
.