1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-23 13:43:22 +00:00
Modernized/improved/actually updated version of ComputerCraft: https://tweaked.cc
Go to file
SquidDev 5409d441b5 Expose peripherals as a capability
This registers IPeripheral as a capability. As a result, all (Minecraft
facing) functionality operates using LazyOptional<_>s instead.

Peripheral providers should now return a LazyOptional<IPeripheral> too.
Hopefully this will allow custom peripherals to mark themselves as
invalid (say, because a dependency has changed).

While peripheral providers are somewhat redundant, they still have their
usages. If a peripheral is applied to a large number of blocks (for
instance, all inventories) then using capabilities does incur some
memory overhead.

We also make the following changes based on the above:
 - Remove the default implementation for IWiredElement, migrating the
   definition to a common "Capabilities" class.

 - Remove IPeripheralTile - we'll exclusively use capabilities now.
   Absurdly this is the most complex change, as all TEs needed to be
   migrated too.

   I'm not 100% sure of the correctness of this changes so far - I've
   tested it pretty well, but blocks with more complex peripheral logic
   (wired/wireless modems and turtles) are still a little messy.

 - Remove the "command block" peripheral provider, attaching a
   capability instead.
2020-05-15 17:09:12 +01:00
.github Merge branch 'master' into mc-1.14.x 2020-05-13 14:04:28 +01:00
config Expose peripherals as a capability 2020-05-15 17:09:12 +01:00
doc Document and test the redstone library 2020-05-15 10:03:47 +01:00
gradle/wrapper Update CC: Tweaked to 1.13 2019-04-02 20:59:48 +01:00
src Expose peripherals as a capability 2020-05-15 17:09:12 +01:00
tools Merge branch 'master' into mc-1.14.x 2020-05-13 14:04:28 +01:00
.editorconfig An initial stab at documentation generation (#360) 2020-04-10 10:27:53 +01:00
.gitattributes Switch generation of resources over to data generators 2020-01-29 16:41:26 +00:00
.gitignore Merge branch 'master' into mc-1.14.x 2020-04-22 09:45:23 +01:00
build.gradle Replace getMethodNames/callMethod with annotations (#447) 2020-05-15 13:21:16 +01:00
CONTRIBUTING.md Merge branch 'master' into mc-1.14.x 2020-04-22 09:45:23 +01:00
gradle.properties Merge branch 'mc-1.14.x' into mc-1.15.x 2020-05-13 14:36:39 +01:00
gradlew Update Gradle and build system 2017-11-14 22:42:03 +00:00
gradlew.bat Update Gradle and build system 2017-11-14 22:42:03 +00:00
illuaminate.sexp Document and test the redstone library 2020-05-15 10:03:47 +01:00
LICENSE Fixed possible Typo. (#337) 2017-06-28 21:39:54 +01:00
README.md Merge branch 'master' into mc-1.14.x 2020-04-22 09:45:23 +01:00
settings.gradle Several recipe improvements 2019-03-19 11:59:23 +00:00

CC: Tweaked

Current build status Download CC: Tweaked on CurseForge

CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles and more to Minecraft.

What?

ComputerCraft has always held a fond place in my heart: it's the mod which really got me into Minecraft, and it's the mod which has kept me playing it for many years. However, development of the original mod has slowed, as the original developers have had less time to work on the mod, and moved onto other projects and commitments.

CC: Tweaked (or CC:T for short) is an attempt to continue ComputerCraft's legacy. It's not intended to be a competitor to CC, nor do I want to take it in a vastly different direction to the original mod. Instead, CC:T focuses on making the ComputerCraft experience as solid as possible, ironing out any wrinkles that may have developed over time.

Features

CC: Tweaked contains all the features of the latest version of ComputerCraft, as well as numerous fixes, performance improvements and several nifty additions. I'd recommend checking out the releases page to see the full set of changes, but here's a couple of the more interesting additions:

  • Improvements to the http library, including websockets, support for other HTTP methods (PUT, DELETE, etc...) and configurable limits on HTTP usage.
  • Full-block wired modems, allowing one to wrap non-solid peripherals (such as turtles, or chests if Plethora is installed).
  • Pocket computers can be held like maps, allowing you to view the screen without entering a GUI.
  • Printed pages and books can be placed in item frames and held like maps.
  • Several profiling and administration tools for server owners, via the /computercraft command. This allows operators to track which computers are hogging resources, turn on and shutdown multiple computers at once and interact with computers remotely.
  • Closer emulation of standard Lua, adding the debug and io libraries. This also enables seeking within binary files, meaning you don't need to read large files into memory.
  • Allow running multiple computers on multiple threads, reducing latency on worlds with many computers.

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 want to get started developing the mod, check out the instructions here.

Community

If you need help getting started with CC: Tweaked, want to show off your latest project, or just want to chat about ComputerCraft we have a forum and Discord guild! There's also a fairly populated, albeit quiet IRC channel, if that's more your cup of tea.

I'd generally recommend you don't contact me directly (email, DM, etc...) unless absolutely necessary (i.e. in order to report exploits). You'll get a far quicker response if you ask the whole community!

Using

If you want to depend on CC: Tweaked, we have a maven repo. However, you should be wary that some functionality is only exposed by CC:T's API and not vanilla ComputerCraft. If you wish to support all variations of ComputerCraft, I recommend using cc.crzd.me's maven instead.

dependencies {
  maven { url 'https://squiddev.cc/maven/' }
}

dependencies {
  implementation fg.deobf("org.squiddev:cc-tweaked-${mc_version}:${cct_version}")
}

You should also be careful to only use classes within the dan200.computercraft.api package. Non-API classes are subject to change at any point. If you depend on functionality outside the API, file an issue, and we can look into exposing more features.