-
-
Notifications
You must be signed in to change notification settings - Fork 911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command api v2 #5036
Draft
RacoonDog
wants to merge
25
commits into
MeteorDevelopment:master
Choose a base branch
from
RacoonDog:command-api-v2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Command api v2 #5036
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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