Commit Graph

17 Commits

Author SHA1 Message Date
Jonathan Coates edf372a695
Merge branch 'mc-1.16.x' into mc-1.18.x 2023-07-07 00:02:42 +01:00
Jonathan Coates 7436447a6e
Several command permission fixes
- Attach permission checks to the first argument (so the literal
   command name) rather than the last argument. This fixes commands
   showing up when they shouldn't.

 - HelpingArgumentBuilder now inherits permissions of its leaf nodes.
   This only really impacts the "track" subcommand.

 - Don't autocomplete the computer selector for the "queue" subcommand.
   As everyone has permission for this command, it's possible to find
   all computer ids and labels in the world.

   I'm in mixed minds about this, but don't think this is an exploit -
   computer ids/labels are sent to in-range players so shouldn't be
   considered secret - but worth patching none-the-less.
2023-07-06 23:41:23 +01:00
Jonathan Coates 413fa5bcc8
Merge branch 'mc-1.16.x' into mc-1.17.x 2022-01-01 15:41:05 +00:00
Jonathan Coates 9d50d6414c
Happy new year
Should be the last time I'll have to do this!
2022-01-01 00:09:34 +00:00
Jonathan Coates 2418cfb87b
More instanceof pattern matching 2021-11-28 15:58:30 +00:00
Jonathan Coates 0d6528aaf0
Merge branch 'mc-1.16.x' into mc-1.17.x 2021-09-19 11:38:25 +01:00
Jonathan Coates 3396fe2871
Make UserLevel.OWNER a little more strict
Closes #904
2021-08-25 22:09:24 +01:00
Jonathan Coates bb1183d274
Update to Minecraft 1.17.1
- Remap everything to use MojMap class names too. This is what Forge
   uses, so \o/.

   This does NOT currently rename any classes to use suffix notation or
   BlockEntity. That will come in a later change. We do however rename
   references of "World" to "Level".

 - Move the test mod into a separate "cctest" source set. As Forge now
   works using Jigsaw we cannot have multiple mods defining the same
   package, which causes problems with our JUnit test classes.

 - Remove our custom test framework and replace it with vanilla's (this
   is no longer stripped from the jar). RIP kotlin coroutines.

   It's still worth using Kotlin here though, just for extension
   methods.

 - Other 1.17-related changes:
    - Use separate tile/block entity tick methods for server and client
      side, often avoiding ticking at all on the client.

    - Switch much of the monitor rendering code to use vanilla's
      built-in shader system. It's still an incredibly ugly hack, so not
      really expecting this to work with any rendering mods, but we'll
      cross that bridge when we come to it.
2021-08-06 17:18:09 +01:00
Jonathan Coates 9f7cc00fcb
Add button to view computer's folder
Implementation is a little awkward, as we can't send OPEN_FILE links
from the server, so we ensure the client runs a
/computercraft open-computer ID command instead. We then intercept this
on the client side and use that to open the folder.
2021-05-28 22:19:04 +01:00
Jonathan Coates 34b5ede326 Switch to Mojang mappings
ForgeGradle (probably sensibly) yells at me about doing this. However:
 - There's a reasonable number of mods doing this, which establishes
   some optimistic precedent.
 - The licence update in Aug 2020 now allows you to use them for
   "development purposes". I guess source code counts??
 - I'm fairly sure this is also compatible with the CCPL - there's an
   exception for Minecraft code.

The main motivation for this is to make the Fabric port a little
easier. Hopefully folks (maybe me in the future, we'll see) will no
longer have to deal with mapping hell when merging - only mod loader
hell.
2021-01-09 19:22:58 +00:00
Jonathan Coates e4b0a5b3ce 2020 -> 2021
Oh, the most useless part of my build process.
2021-01-06 17:13:40 +00:00
SquidDev 41a1b99f7d Merge branch 'master' into mc-1.14.x 2020-01-13 15:05:50 +00:00
SquidDev 93a9ebc4f6 Happy new year 2020-01-01 00:09:18 +00:00
SquidDev 39a9ad0ce7 Initial update to 1.14
So very little works, but it compiles and runs.

Things to resolve over the next few days:
 - Horrible mappings (should largely be resolved by tomorrow).
 - Cannot send extra data over containers - we'll have to see what Forge
   does here.
 - Turtle models are broken
 - No block drops yet - this will largely be cherry-picking whatever I
   did on Fabric.
 - Weird inventory desyncs (items don't show up initially when
   interacting with a CC inventory).
 - Probably lots of other things.
2019-06-08 13:36:31 +01:00
SquidDev f9e13ca67a Update CC: Tweaked to 1.13
Look, I originally had this split into several commits, but lots of
other cleanups got mixed in. I then backported some of the cleanups to
1.12, did other tidy ups there, and eventually the web of merges was
unreadable.

Yes, this is a horrible mess, but it's still nicer than it was. Anyway,
changes:

 - Flatten everything. For instance, there are now three instances of
   BlockComputer, two BlockTurtle, ItemPocketComputer. There's also no
   more BlockPeripheral (thank heavens) - there's separate block classes
   for each peripheral type.

 - Remove pretty much all legacy code. As we're breaking world
   compatibility anyway, we can remove all the code to load worlds from
   1.4 days.
 - The command system is largely rewriten to take advantage of 1.13's
   new system. It's very fancy!

 - WidgetTerminal now uses Minecraft's "GUI listener" system.

 - BREAKING CHANGE: All the codes in keys.lua are different, due to the
   move to LWJGL 3. Hopefully this won't have too much of an impact.

   I don't want to map to the old key codes on the Java side, as there
   always ends up being small but slight inconsistencies. IMO it's
   better to make a clean break - people should be using keys rather
   than hard coding the constants anyway.

 - commands.list now allows fetching sub-commands. The ROM has already
   been updated to allow fancy usage such as commands.time.set("noon").

 - Turtles, modems and cables can be waterlogged.
2019-04-02 20:59:48 +01:00
SquidDev 1c9110b927 Happy new year! 2019-01-01 01:10:18 +00:00
SquidDev ee3347afbd A whole bunch of refomatting
- Remove redundant constructors and super calls
 - Standardise naming of texture fields
 - Always use postfix notations for loops
 - Cleanup several peripheral classes
2018-12-30 16:42:41 +00:00