Commit Graph

1581 Commits

Author SHA1 Message Date
R93950X d5de39ebd4
Fix time formatting (#527)
Fixes #525.

Co-authored-by: R93950X <R93950X@users.noreply.github.com>
2020-08-22 15:17:12 +01:00
SquidDev 0faf76e4bd Fix if statement never being hit
Let's been honest, this bit's probably never been tested, because it
should never happen. Fixes #528.
2020-08-22 15:03:38 +01:00
SquidDev e8e2ed9fe5 Fix incorrect lower bound in mods.toml
It appears I had failed to update this when last bumping the Forge
version. Closes #521 - we're relying on a feature only added in Forge
31.1.16, and they're using 3.1.14.
2020-08-09 21:51:55 +01:00
SquidDev 9f72448ecd Properly deprecate colors.rgb8 2020-08-04 19:50:36 +01:00
SquidDev 3da3f16deb Fix link to logo 2020-08-04 18:30:22 +01:00
hydraz 0e2ce3c634
Make the key for mtime "modified" in fs.attributes (#512) 2020-07-31 18:39:09 +01:00
SquidDev fe00e00537 Mention people should include logs 2020-07-31 18:31:47 +01:00
Jonathan Coates cd879b067f
Merge pull request #508 from neumond/mc-1.15.x
Fix JSON serialization of strings
2020-07-25 17:51:46 +01:00
neumond 053cb1b53c Fix JSON serialization of strings
Control characters become escaped as JSON requires
Non-ASCII characters get escaped as well for better interoperability
We assume here that lua strings represent only first 256 code points of unicode
2020-07-25 19:40:06 +03:00
SquidDev ac7979fb46 Bump for 1.90.2 2020-07-25 11:53:46 +01:00
SquidDev d51851e763 Use FML's scan data to gather annotations
We can just scrape them from the @AutoService annotation, which saves us
having to duplicate any work. Hopefully fixes #501, but I haven't tested
in a non-dev environment yet.
2020-07-23 22:41:20 +01:00
BlackDragon-B fb70a1a998
Added Windows thing. (#500) 2020-07-18 18:59:52 +01:00
SquidDev 2f323f23d7 Update changelog for release 2020-07-18 12:23:36 +01:00
SquidDev 95554a53d1 Move getResourceFile to CCAPIImpl
Just means we've got all the resource processing code in one place, and
keeps (most) MC code out of CC itself.
2020-07-18 10:31:28 +01:00
SquidDev 89c1b2771d Allow configuring max monitor render distance
64 blocks out to be enough for anyone. But just in case. Closes #494
2020-07-18 10:26:34 +01:00
SquidDev 8f069a9b72 Remove absolute file path from FS errors
When dealing with invalid paths (for instance, ones which are too long
or malformed), Java may throw a FileSystemException. This contains the
absolute path (i.e. C:/Users/Moi/.../.minecraft/...), which is printed
to the user within CC - obviously not ideal!

We simply catch this exception within the MountWrapper and map it back
to the local path. The disadvantage of doing it here is that we can't
map the path in the exception back to the computer - we'd need to catch
it in FileMount for that - so we just assume it referrs to the original
path instead.

Doing it in FileMount ends up being a little uglier, as we already do
all the exception wrangling in FileWrapper, so this'll do for now.

Fixes #495
2020-07-18 10:13:43 +01:00
SquidDev 2e9d6603e3 Correct IPeripheral documentation
It's no longer possible to implement this on the tile, due to the
conflict in getType. Given this is a really bad idea, it's not a big
issue, but we should mention it in the documentation.

Fixes #496.
2020-07-14 19:53:10 +01:00
SquidDev a6a1b9b8e5
Add a whole tonne of documentation
There's a bit of duplication here, so we might try to clean this up, but
it's a good starting point.
2020-07-09 21:59:19 +01:00
SquidDev 3f277a7a7b Bump version to 1.90.0
Going to let this stew for a couple of days - there's probably something
else which'll break.
2020-07-06 15:38:09 +01:00
SquidDev 90c5d3f1e8 Don't load the chunk when watching monitors
Hopefully fixes #493
2020-07-06 15:21:14 +01:00
Naheulf a5f7cf8334
Add enchantments and unbreakable to ItemData.java. (#488) 2020-07-06 14:18:07 +01:00
JackMacWindows 3075f89797
Added Javadoc for currently undocumented functions (#490)
This PR adds some documentation for APIs that did not have docs in the
source yet. This includes the:

* drive peripheral
* FS API
* OS PAI
* printer peripheral
* speaker peripheral
2020-07-05 08:26:37 +01:00
Weblate 45297665c6 Translations for Russian
Translations for French

Co-authored-by: neumond <alice.johnson@yandex.ru>
Co-authored-by: Naheulf <newheulf@gmail.com>
2020-07-05 03:41:59 +00:00
Jonathan Coates ddbf3fc111
Merge pull request #491 from neumond/mc-1.15.x
Add port to Host http header if necessary
2020-07-04 21:48:20 +01:00
Weblate da82b89676 Added translation for Russian
Co-authored-by: neumond <alice.johnson@yandex.ru>
2020-07-04 20:41:15 +00:00
neumond d5f1a2c817 Add port to Host http header if necessary 2020-07-04 22:16:48 +03:00
SquidDev 6020adef6b Link to Weblate in CONTRIBUTING
Let's make it at least a little bit discoverable!
2020-07-04 10:17:40 +01:00
SquidDev d2a52a8b5d Fix turtle.craft failing when missing an argument.
Stupid typo, stupid squid.
2020-07-03 21:37:14 +01:00
SquidDev 9f8774960f Generate documentation stubs from Javadocs
illuaminate does not handle Java files, for obvious reasons. In order to
get around that, we have a series of stub files within /doc/stub which
mirrored the Java ones. While this works, it has a few problems:

 - The link to source code does not work - it just links to the stub
   file.
 - There's no guarantee that documentation remains consistent with the
   Java code. This change found several methods which were incorrectly
   documented beforehand.

We now replace this with a custom Java doclet[1], which extracts doc
comments from @LuaFunction annotated methods and generates stub-files
from them. These also contain a @source annotation, which allows us to
correctly link them back to the original Java code.

There's some issues with this which have yet to be fixed. However, I
don't think any of them are major blockers right now:

 - The custom doclet relies on Java 9 - I think it's /technically/
   possible to do this on Java 8, but the API is significantly uglier.
   This means that we need to run javadoc on a separate JVM.

   This is possible, and it works locally and on CI, but is definitely
   not a nice approach.

 - illuaminate now requires the doc stubs to be generated in order for
   the linter to pass, which does make running the linter locally much
   harder (especially given the above bullet point).

   We could notionally include the generated stubs (or at least a cut
   down version of them) in the repo, but I'm not 100% sure about that.

[1]: https://docs.oracle.com/javase/9/docs/api/jdk/javadoc/doclet/package-summary.html
2020-07-03 13:31:26 +01:00
SquidDev 36bb8b67c9 Clean up data-gathering code
- Refer to this as "data" rather than "metadata". I'm still not sure
   where the meta came from - blame OpenPeripheral I guess.
 - Likewise, use getItemDetail within inventory methods, rather than
   getItemMeta.
 - Refactor common data-getting code into one class. This means that
   turtle.getItemDetail, turtle.inspect and commands.getBlockInfo all
   use the same code.
 - turtle.getItemDetail now accepts a second "detailed" parameter which
   will include the full metadata (#471, #452).
 - Tags are now only included in the detailed list. This is a breaking
   change, however should only affect one version (1.89.x) and I'm not
   convinced that the previous behaviour was safe.
2020-06-30 12:35:39 +01:00
SquidDev 8f3a56dd32 Merge branch 'mc-1.14.x' into mc-1.15.x 2020-06-30 11:31:41 +01:00
SquidDev 113d5d982f Merge branch 'master' into mc-1.14.x 2020-06-30 11:28:56 +01:00
SquidDev 37a447e745 Bump version to 1.89.2
Somewhat reluctant to do this, but it's a pretty major bug.
2020-06-30 11:10:26 +01:00
SquidDev 9e2232d240 Clean up entity drop code
We were incorrectly using captureDrops directly - it's more reasonable
to listen to the drop event. Fixes #486
2020-06-30 11:10:24 +01:00
Jonathan Coates 514db30fb1
Add configuration options to control terminal sizes (#475)
This allows for configuring the size of computers and pocket computers, 
as well as the max size of monitors.

There's several limitations with the current implementation, but it's
still "good enough" for an initial release:
 - Turtles cannot be resized.
 - GUIs do not scale themselves, so "large" sizes will not render within
   the default resolution.
2020-06-28 16:33:03 +01:00
Jonathan Coates 08181f72d4
Generic peripherals for any tile entities (#478)
This exposes a basic peripheral for any tile entity which does not have methods
already registered. We currently provide the following methods:

 - Inventories: size, list, getItemMeta, pushItems, pullItems.
 - Energy storage: getEnergy, getEnergyCapacity
 - Fluid tanks: tanks(), pushFluid, pullFluid.

These methods are currently experimental - it must be enabled through 
`experimental.generic_peripherals`. While this is an initial step towards
implementing #452, but is by no means complete.
2020-06-27 10:47:31 +01:00
SquidDev 613a28a5af Switch to Forge's DeferredRegister
Well, mostly. We currently don't do recipe serializers as I'm a little
too lazy. For items, blocks and TE types this does make registration
nicer - we've some helper functions which help reduce duplication.

Some types (containers, TEs, etc..) are a little less nice, as we now
must define the registry object (i.e. the WhateverType<?>) in a separate
class to the class it constructs. However, it's probably a worthwhile
price to pay.
2020-06-27 10:23:51 +01:00
Weblate e4c422d6f9 Translations for German
Co-authored-by: Jummit <jummit@web.de>
2020-06-27 01:59:35 +00:00
Weblate 478f992dea Translations for German
Co-authored-by: Jummit <jummit@web.de>
2020-06-25 16:49:08 +00:00
JakobDev b54519d0e6
Add functions for parsing and drawing nft (#458) 2020-06-25 09:08:35 +01:00
Jonathan Coates 9499654757
Add documentation for peripherals
No clue how we're going to do this for the dynamic peripheral system
if/when that ships, but this is a good first stage.

Like the Java APIs, this relies on stub files, so we can't link to the
implementation which is a bit of a shame. However, it's a good first
step.
2020-06-24 12:12:06 +01:00
SquidDev c5138c535c Fix write method missing from printers
I'm really not very good at this modding lark am I? I've done a basic
search for other missing methods, and can't see anything, but goodness
knows.

Fixes #480
2020-06-23 10:01:44 +01:00
SquidDev 5bd8d84d14 Add missing config option for command computers
Fixes #479
2020-06-22 11:35:21 +01:00
Weblate ab0310e27c Translations for Italian
Translations for French

Translations for French

Co-authored-by: hds <hds536jhmk@gmail.com>
Co-authored-by: Anavrins <xanavrins@gmail.com>
Co-authored-by: AxelFontarive <afontarive@gmail.com>
2020-06-21 16:42:35 +00:00
SquidDev 607751da40 Upload on all (active) mc-* branches 2020-06-21 13:24:47 +01:00
SquidDev 1efabccd14 Merge branch 'mc-1.14.x' into mc-1.15.x 2020-06-21 12:09:28 +01:00
SquidDev 029374e9aa Merge branch 'master' into mc-1.14.x 2020-06-21 12:08:30 +01:00
SquidDev 2a8efb3fd5 Fix crashes when rendering monitors of varying sizes
When calling .flip(), we limit the size of the buffer. However, this
limit is not reset when writing the next time, which means we get
out-of-bounds errors, even if the buffer is /technically/ big enough.

Clearing the buffer before drawing (rather than just resetting the
position) is enough to fix this.

Fixes #476 (and closes #477, which is a duplicate)
2020-06-21 12:03:24 +01:00
SquidDev 48edcde4ef Fix handling of CC: T's version
We never added back replacing of ${version} strings, which means that CC
was reporting incorrect version numbers in _HOST, the user agent and
network versions. This meant we would allow connections even on
mismatched versions (#464).

We shift all version handling into ComputerCraftAPI(Impl) - this now
relies on Forge code, so we don't want to run it in emulators.
2020-06-19 18:49:27 +01:00
Weblate 58a2995bbc Translations for Dutch
Translations for Chinese (Simplified)

Translations for Korean

Translations for German

Co-authored-by: SquidDev <bonzoweb@hotmail.co.uk>
2020-06-18 14:10:23 +00:00