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.
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
Support for schematics file format #263
base: main
Are you sure you want to change the base?
Support for schematics file format #263
Changes from all commits
bc6d058
dbe79ab
8ee6c3f
b7d671a
86f7b9c
2a96178
4ae80ba
314eb0c
4c37f60
ada8da4
a2e32be
8f474ee
a076977
8c0054c
953a851
58001c9
ae387ff
9bf5af0
13e0594
1c5c8fa
d4eb42d
32f20ca
e4c20b9
3c7a2b2
e646c63
b24fb5a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you add some tests for this?
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.
We should make this tolerant of the
minecraft:
namespace in the input.A bit out of scope, but we should really replace
BlockKind::from_str
andBlockKind::to_str
withBlockKind::from_ident
andBlockKind::to_ident
.Ident<&'static str>
wasn't a thing when those were written.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 problem that it's not necessarily
Ident
s which we get in here, but also the block state props(so like
fence[west=true]
which wouldn't parse asIdent
, right?)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.
as for this: I believe that would be a better fit for the
BlockKind::from_str
methodThere 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 whole thing isn't an ident, but presumably the string before the
[
is, which you have access to in thekind
variable.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.
ahh right I misread part of your first message 😄 I see know
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.
This will panic if
props
is empty. Also it doesn't check if the last char is actually a]
.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.
glam
andvalence_nbt
can be used via the re-exports invalence_server
, so no explicit dependency needed. (glam stuff is in valence_math)`.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.
glam yes, but with from
valence_nbt
I explicitly need thevalence_ident
feature, which is not enabled invalence_server
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.
This line is redundant.
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.
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.