Commit Graph
2996 Commits
Author SHA1 Message Date
Jonathan Coates 93e4ecd350 Refresh redstone output when first creating a computer
This is an identical fix to 013f2e500f,
but for computers rather than redstone integrators.

I don't love the duplication — it might make more sense to move this
into RedstoneState.updateOutput and have an "initial tick" flag there
instead.

Fixes #2392.
2026-09-18 11:06:26 +01:00
Jonathan Coates 1a7f9ce995 Update computer position in transferStateTo instead
No change in behaviour, just feels a little cleaner. And one fewer
places where we call createServerComputer()...
2026-09-18 10:47:35 +01:00
Jonathan Coates fbbee65c84 Update MinecraftExec to work with config cache
- Switch withFileContents/withFileSource to be normal inputs.
 - Download complementary shaders from Maven instead.
2026-09-17 14:52:57 +01:00
Jonathan Coates cc54413718 Fix reference to core-api in common javadoc task 2026-09-16 14:35:08 +01:00
Jonathan Coates c04b7599de Replace 26.2 with 26.3 in issue template 2026-09-15 21:48:57 +01:00
Jonathan Coates 019855dfb2 Some more Gradle tweaks
- Fix missing license header and some over-eager gitignore removals.
 - Fix several isolated project errors. I think all the remaining ones
   come from limitations in other projects:
    - MDG's mod configs don't support referencing source sets from other
      projects.
    - idea-ext is terrible in every way.

   There's some nastiness in MergeTrees where we can't do
   `resources.elements.map { it.single() }` as it throws a configuration
   cache error, so we now use a ConfigurableFileCollection. Somehow it
   still works.
2026-09-12 10:54:59 +01:00
Jonathan Coates a4d172bcbe Gradle cleanup/overhaul.
- Fix a whole bunch of ErrorProne warnings. It's still quite noisy, but
   most of the remaining ones now come from Java.

 - Move some config from java-conventions to a new base-conventions,
   which can be used for non-Java projects. As part of this, we now kill
   the CCTweaked plugin, and just install the cct extension in
   base-conventions instead.

 - Kill inlineProject/externalSources. We now:
    - Add an embeddedProject configuration which is used to define
      projects that are embedded within the final jar. We do some fun
      variant resolution in ExternalProjectArtifacts to extract the
      class/resource/source directories from the configuration.
    - Add a new verifyClassesMatch task which recompiles the game and
      ensures compiling everything against the loader's version of
      Minecraft gives us the same result.
2026-09-11 20:10:58 +01:00
Jonathan Coates b634ef80c8 Move buildSrc to build-logic
What Gradle recommends seems to have gone pretty back-and-forth on this,
but it seems like this is the standard these days.
2026-09-11 12:15:46 +01:00
Jonathan Coates d449cbc3e7 Some basic datapack documentation 2026-09-09 10:07:36 +01:00
Jonathan Coates 358a6e6263 Relax supported HTTP verbs
There's some really awkward duplication in the HTTP API right now, where
the Lua code reimplements the validation the Java implementation
provides, in order to throw errors at the right level.

In this particular case, our Lua validation was stricter than the Java,
only permitting a known set of verbs. This commit:

 - Makes the Java-side validation a little stricter, to only allow verbs
   matching [A-Z_-]{1,32}. This is strictly much stricter than what the
   HTTP spec allows, but I think makes sense as a restriction.

 - Update the Lua wrapper to match this logic, rather than being
   stricter.

Fixes #2501.
2026-08-28 20:36:19 +01:00
Jonathan Coates 3469060b6b Update Gradle and dependencies
- Fix *some* cross-project isolation issues. This appears to be the
   bare minimum to make the configuration cache happy. There is
   obviously a lot more work to do here.

 - Enable Configuration cache.

 - Fix some new checkstyle/errorprone/nullaway warnings.
2026-08-27 16:33:36 +01:00
Jonathan Coates 99e9c72686 Fix a whole bunch of spelling mistakes
Using typos[^1]. I wrote a config for this years ago, but never checked
it in. All things considered, there's fewer than I expected.

Fun fact: the CCPL contains the text "if added to to the main
repository", and I can't/shouldn't fix it, because it's an external
license!

[^1]: https://github.com/crate-ci/typos/
2026-08-26 14:40:04 +01:00
Jonathan Coates 7d05fa9ac2 Remove MC version from project name
This dates back from when we had multiple MC versions in a single
project (see the build-tools branch). We don't do this any more, so no
need for it.

(More importantly, something has changed in IDEA/Gradle so that the
1.20.1 now is escaped as 1_20_1, which breaks Fabric Loom).
2026-08-25 14:56:45 +01:00
Jonathan Coates 7b7039c677 Fix turtle.place() not skipping ItemStack.useOn 2026-08-21 13:53:02 +01:00
Jonathan Coates 8bdea64474 Fix multishell not culling after changing focus
When we resume a process, the code looks like:

  resumeProcess(nCurrentProcess, ...)
  if cullProcess(nCurrentProcess, ...) then ... end

However, if the focused tab changes while resuming (via
multishell.setFocus), then we don't cull the correct process!

To fix this, we just add a helper function which resumes+culls, meaning
we only read the mutable global once.
2026-08-14 16:45:46 +01:00
ItsVingtdeux 9c1a9a6319 Fix random indentation of two lines in bios.lua (#2495)
The "type" field definitions for the "edit.autocomplete" and
"lua.autocomplete" settings were both randomly indented, compared to the
rest of the setting definitions.
2026-08-14 09:54:16 +01:00
Jonathan Coates 67732ace06 Sync translations from Crowdin 2026-08-08 17:04:50 +01:00
Jonathan Coates c3cfb206de Bump CC:T to 1.120.2 v1.20.1-1.120.2 2026-08-08 10:13:48 +01:00
Jonathan Coates d37793d29a Some small cleanup to the block placing code
Just clarify a couple of things which are a little confusing.

 - Explicitly initialise the position within deployOnEntity, rather than
   relying on getWithPosition above.
 - Rename "position" to "blockPos" in deployOnBlock to make it clearer
   whose position it is.
 - Clarify that we need to call use(...) for all directions.
2026-07-26 12:36:34 +01:00
Jonathan Coates f2161f0765 Add all turtle/pocket upgrades to the search creative tab
This means we no longer need to register additional stacks with recipe
mods, as they'll pick them up from the creative tab instead.

Closes #2463.
2026-07-26 10:41:17 +01:00
Tomodachi94 2b0adaea5c Document sleep()'s optional parameter (#2488) 2026-07-26 07:40:00 +00:00
Jonathan Coates 7ab92628d9 Some cleanup to CI workflow
- Bump versions
 - Remove some workarounds for flakiness. MDG is much more robust than FG
   used to be.
2026-07-22 13:24:34 +01:00
Jonathan Coates e0c530efe2 Add missing @GuardedBy 2026-07-22 13:21:19 +01:00
Jonathan Coates 3607165cf9 Run pre-commit with --all-files in CI
Wow, this has been broken for ages.
2026-07-22 13:17:20 +01:00
Jonathan Coates 1ec5d53a68 Add test for brewing stand item limit
See #2480.
2026-07-22 12:01:35 +01:00
Jonathan Coates db070d7737 Add missing @Nullability annotations to arg lists
The *contents* of the array is nullable, but the array itself isn't.
2026-07-22 11:48:58 +01:00
Jonathan Coates e83fdd2d5d Fix several BE render bounds
- Monitors were one block taller/wider than they should be.
 - Lecterns are higher than one block, so got cut off if just looking at
   the top.
2026-07-21 11:59:02 +01:00
Jonathan Coates 6f16cd6b0e Reset pocket computer if family changes
When we upgrade a normal pocket computer to an advanced one, we need to
create a new ServerComputer instance (and destroy the old one).

On 1.20.1 the ComputerUpgradeRecipe does not preserve the
instance/session ID on the resulting stack. When the item is next
ticked, we create a new computer, with the old computer no longer being
kept alive and eventually dying.

On 1.21.1 we copy all components, *including* the the current computer
reference. This means a new computer is never created and so we continue
to use the old one (with the wrong family). We could exclude the
computer component from the recipe (and so have the same behaviour as
1.20.1), but by adding a hook in onCraftedBy we can destroy the old
computer immediately, ensuring it no longer continues to run.

Fixes #2479.
2026-07-12 16:30:46 +01:00
Jonathan Coates 1cf0ff299e Fix shell crashing if read() doesn't yield
This never happens normally, but can happen if read() is overridden.
2026-07-07 14:03:27 +01:00
Jonathan Coates 3404dcbbd8 Lower size/time-taken in base64 test
This sometimes fails in CI, as the GHA machines are slower than my own.
2026-07-05 11:23:20 +01:00
Jonathan Coates 1fa227d573 Link to write/print in term.write docs 2026-07-03 09:03:53 +01:00
Jonathan Coates b4805fd765 Add tests to check dynamic recipes are well-formed
- Check whether impostor recipes (and other custom shaped/shapeless
   recipes) match the "real" recipe.
 - Check whether our upgrade recipe generator generates valid recipes.
   Reasoning about left/right upgrades (and top/back ones on 26.2) is a
   bit confusing, so this should prevent any errors.
2026-07-02 15:03:00 +01:00
Jonathan Coates 0e8600b10c Clarify text mode changes in 1.109
Fixes #2470.
2026-06-28 22:35:23 +01:00
Jonathan Coates 143a5b2918 Replace 26.1 with 26.2 in issue template 2026-06-16 17:38:20 +01:00
Jonathan Coates 715d2e01db Bump CC:T to 1.120.0 v1.20.1-1.120.0 2026-06-15 22:30:32 +01:00
Jonathan Coates 3ecc17ec90 Update dependencies
- Update Loom — required for MC 26.2.
 - Update TeaVM, using the new reflection API.
2026-06-15 20:33:55 +01:00
Jonathan Coates a83385450f Add/bump foojay resolver plugin
We only have this on the 1.21 branch for some reason. Fixes #2457 once
this is merged across.
2026-06-15 18:43:40 +01:00
Jonathan Coates a76220b395 Revert redundant indexOf
I'd considered moving this into the HostRange in
27137c67f7, but eventually decided against
it. Just didn't fully revert the commit!
2026-06-15 18:39:49 +01:00
Jonathan Coates 27137c67f7 Refactor host rule code a little
Now we just use builtin INetAddress predicates or HostRange, rather than
a mix of custom predicates, sets and HostRange.

Also add some other ranges from the reserved list, and link to that list
to make it a bit easier to find stuff in the future.
2026-06-08 13:47:29 +01:00
Jonathan Coates 57ea451d60 Fix a few small typos
Well, mostly my inability to spell.
2026-06-06 11:39:29 +01:00
Jonathan Coates d1bfb2571d Block RFC 8215-style addresses too.
I don't konw if this actually matters, but better safe than sorry.
Everything here confuses me — my understanding of RFC 6052 was that
private IP addresses cannot be used with NAT64, but AWS apparently
allows it? Not sure if I or Amazon is wrong (or both!).
2026-06-05 09:42:41 +01:00
Jonathan Coates 6e28099379 Fix typo in startup docs 2026-06-02 21:44:53 +01:00
Jonathan Coates 8f8e22a06f Some documentation on startup files
Fixes #2233, closes #1069. I don't love this (and the examples are a
massive hack!), but it's better than nothing.
2026-05-28 17:05:14 +01:00
Jonathan Coates 53f7fbd03f Document internal exception protocol 2026-05-28 12:47:40 +01:00
Ruby H 15a5e776cb Support spawning new parallel functions (#2263)
- Split implementation of `parallel.waitFor{All,Any}` up. Their
   implementations are now sufficiently complicated it doesn't make
   sense to share the core.

 - Support spawning new functions from within `parallel.waitForAll`.

 - Flesh out the `parallel.waitForAll` docs a little.
2026-05-26 14:13:07 +00:00
Jonathan Coates 3e7ce15ba6 Link /computercraft queue and computer_command docs 2026-05-18 15:21:04 +01:00
Jonathan Coates 432214f70a Bump CC:T to 1.119.0 v1.20.1-1.119.0 2026-05-16 14:57:17 +01:00
Jonathan Coates 585b6d4d39 Block NAT64 addresses 2026-05-16 14:41:37 +01:00
Jonathan Coates 87916cf342 Prohibit specifying interface in IPv6 addresses 2026-05-16 14:37:21 +01:00
Jonathan Coates 39aab8c384 Add cc.base64 module
Don't love the API here, but really trying to overthink *everything*.

Closes #1960.
2026-05-15 14:30:48 +01:00