-
Notifications
You must be signed in to change notification settings - Fork 1
Replace item #4
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
base: main
Are you sure you want to change the base?
Replace item #4
Conversation
Added slots to _types.py
Improved replaceItem
Added replaceItem
fixed pos in world.py
Removed mistake
Removed mistakes
Removed mistakes
Removed mistakes
Fixed imports
Fixed coordinates
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.
Sehr gut, hab alles getestet (Blocks und Entities) und es scheint mir alles gut zu funktionieren. Besonders die SLOT Variable finde ich sehr hilfreich, da mir mein autocomplete direkt vorschläg was ich brauche 👍
@@ -23,3 +23,156 @@ | |||
"red", | |||
"black", | |||
] | |||
|
|||
SLOTS: TypeAlias = Literal[ |
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.
Bitte Einzahl verwenden, also SLOT statt SLOTS.
@@ -97,6 +98,12 @@ def setBlockCube(self, blocktype: str, pos1: Vec3, pos2: Vec3) -> None: | |||
) | |||
) | |||
raise_on_error(response) | |||
|
|||
def replaceItem(self, pos: Vec3, slot: SLOTS, item: str, amount: int = 1, nbt: NBT | None = None) -> None: | |||
if nbt is None: |
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.
Bitte hier nur kurz die position abrunden, falls jemand keine Ganzzahlige Position hineinreicht.
(also, vor dem if ein pos = pos.floor()
oder so, sollte meistens keine Rolle spielen, aber war eine Idee, die ich gerade hatte
Bitte siehe meinen Kommentar in #5 wo ich |
No description provided.