FlashyReese / CommandAliases

Alternate short commands for complex commands
MIT License
25 stars 6 forks source link

Please update to 1.18 #22

Closed wolfen351 closed 2 years ago

wolfen351 commented 2 years ago

Hi there

Love this mod, use it on my family server. Please will you recompile it for 1.18?

Thanks!

wolfen351 commented 2 years ago

I see there is a 1.18 branch, and it compiles fine, but in game it just does nothing :(

LucilleTea commented 2 years ago

Yeah, seems like the latest commit on the 1.18 branch does nothing for me on a 1.18.1 server. There's nothing logged from commandaliases at all, other than it being in the list of active mods. Commands that come with the mod, as well as commands configured, don't exist. The config file was also not automatically generated.

FlashyReese commented 2 years ago

Sorry, the 1.18.x/dev branch is has a lot of changes that didn't make it into the 1.17 release. It's still a work in progress. I currently don't have time to work on it at the moment. It will be released when it's ready.

Edit: The format has also slightly changed.

wolfen351 commented 2 years ago

OK, thanks for that info! I went back to the 1.17 branch and made the minimal changes needed to upgrade it to 1.18.1 - here is an experimental build for those that are willing to trust an internet stranger! :)

I've tested that it works fine in my worlds.

https://random.wolfen.za.net/commandaliases-1.18.1-9.0.0.jar

wolfen351 commented 2 years ago

I've added a PR #23 to this repo - so others can review the code changes I made. @FlashyReese perhaps you could release the 1.18.1 version with the old stuff, until the new stuff is ready?

pahanakun commented 2 years ago

thanks for building and uploading!

COMMAND_REDIRECT is working fine, however COMMAND_REASSIGN is not

when trying to reassign, all it does is break the tab autocomplete. the "reassignTo" does nothing, just gives an error when trying to execute it in game. The original command still works, just with no autocomplete.

removing the reassign from the config and reloading doesn't revert things to normal either. the whole server needs to be stopped and started again. I also notice an error in the console:

[Server thread/ERROR]: Skipping "help", couldn't modify command literal

This is the error when using the example to reassign help to minecraft:help. It only appears on server start, it does not appear when running /commandalias reload.

Also I get errors like [17:49:24] [Server thread/ERROR]: Could not find existing command "home set" because /home was supposed to be reassigned. Despite getting these errors, the aliases still work.

I was trying to get it to work for /home for Essential-Commands, it uses the syntax /home tp (homename) to teleport to homes and I want to make it so you don't have to type tp. redirects for /home set -> /sethome and /home delete -> /delhome work fine, but I obviously can't redirect /home tp -> /home. For now I'm just going to redirect /home tp -> /go, but it would be nice to get COMMAND_REASSIGN to work.

Running 1.18.1 fabric loader 0.12.12 fabric api 0.45.0+1.18

wolfen351 commented 2 years ago

I wish I knew how to fix that, but its beyond my mod skills! I see what you are saying, disconnect the existing command and then you can hook up a new one in that space. I use vanillatweaks.net datapack on my worlds, with their commands like /trigger home set 1 mapped with commandaliases to /home 1 - perhaps a similar approach might work for you?

FlashyReese commented 2 years ago

I wish I knew how to fix that, but its beyond my mod skills! I see what you are saying, disconnect the existing command and then you can hook up a new one in that space. I use vanillatweaks.net datapack on my worlds, with their commands like /trigger home set 1 mapped with commandaliases to /home 1 - perhaps a similar approach might work for you?

You can see https://github.com/FlashyReese/CommandAliases/commit/4ba851620187b9896cf957941810a1ad16d82924 for reference, code is pretty similar.

Sorry, I haven't found the time and motivation for publishing the new changes and updating the wiki.