Skip to content
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

Create bindings for vanilla Minecraft commands as of MC 1.20 #2

Open
fisher60 opened this issue Jan 17, 2024 · 0 comments
Open

Create bindings for vanilla Minecraft commands as of MC 1.20 #2

fisher60 opened this issue Jan 17, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@fisher60
Copy link
Member

Summary

In order to validate commands with our web app, it is useful to have bindings for all Minecraft commands. Having some validation will be helpful. It would be nice for these to already be pydantic models so that they work seamlessly with the existing web app.
 
We can use this comprehensive list as our source of truth. We only need to consider commands that are compatible on PC Java edition (JE) for now.

An example implementation of this may use Pydantic models as follows:

# models.py
from pydantic import BaseModel

class Command(BaseModel):
    command: str

class GiveArgs(BaseModel):
    """give <target> <item> [<count>]"""
    target: str
    item: str
    count: int
# commands.py
import .models

class Give(Command):
    args: GiveArgs
@fisher60 fisher60 added the enhancement New feature or request label Jan 17, 2024
@fisher60 fisher60 self-assigned this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant