-
-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Command api v2 #5036
base: master
Are you sure you want to change the base?
Command api v2 #5036
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR as a whole looks promising, do you have plans for further changes?
Also plz add the requested descriptions 🙏
|
||
public class MultitoolCommand extends Command { | ||
public MultitoolCommand() { | ||
super("multitool", ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description
|
||
public class TransmogrifyCommand extends Command { | ||
public TransmogrifyCommand() { | ||
super("transmogrify", "", "tranmog"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description
Overview
This pull request contains new API functions for addon developers, bug fixes, performance fixes, QOL fixes, 4 new commands, and rewrites of existing commands to add new functionality.
Command Changes
.nbt
.components
command..components
full
flag to switch between get/copying the fullComponentMap
or just theComponentChanges
of an itemstack.paste
subcommand.rename
subcommand..macro
You can now create new macros through commands with
.macro create
, delete them with.macro delete
, rebind them with.macro bind
, and modify their contents with.macro edit
.enderchest
.enderchest
will now display an error if the ender chest contents are unknown instead of opening an empty inventory.New Commands
.components
Contains the subcommands that deal with itemstacks that were removed from
.nbt
.config
Edit your Meteor Client configurations through commands much like how
.setting
works with modules configurations..transmogrify
Lets you change the appearance of an item in your inventory to any other item in the game through item data components. Requires creative mode.
API Changes
The command registry access (
Command.REGISTRY_ACCESS
) and command dispatcher (Commands.DISPATCHER
) are now dynamically rebuilt on every world join to properly support command argument types which make use of dynamic registries.NotebotSongArgumentType
will now throw a command syntax exception when the input does not match an existing file in the notebot folder, meaning manual checking is no longer necessary.FakePlayerArgumentType
,FriendArgumentType
,ProfileArgumentType
, andWaypointArgumentType
are now properly typed instead of usingString
and external parsing.WaypointArgumentType
no longer has an option for using a greedy string, it now usesStringReader#readString
which either takes in a single word or a quoted string.Two new argument types imported from clientarguments under the MIT license:
BlockPosArgumentType
andEntityArgumentType
.Utility classes for dealing with creative inventory packets in commands,
ItemSlotArgumentType
andCreativeCommandHelper
.Utility classes for encoding & decoding itemstack
ComponentMap
s andComponentChanges
to and from string,ComponentMapWriter
andComponentMapReader
.Utility class for decoding a
Path
in a command,PathReader
.Performance Optimizations
Switched command aliases from full-blown duplicate command trees to single redirect nodes.
Replaced usages of
Text
within command exception types toLiteralMessage
, removing an unused allocation of aStyle
object.Removed redundant sanity checking in
CompoundNbtTagArgumentType
that was already covered inStringNbtReader#parse