Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.

Commit

Permalink
Merge #135
Browse files Browse the repository at this point in the history
135: Fixed itemCriteria and fixed whitespace error on data modify r=Levertion a=MSpaceDev

Fixed itemCriteria returning entities instead of items. Fixed data modiy so that it does not return an error when there is whitespace after the nbt path.

Edit by @Levertion: fixes #134 
fixes #133.

Co-authored-by: MSpaceDev <[email protected]>
  • Loading branch information
bors[bot] and MSpaceDev committed Apr 27, 2019
2 parents 2053e6b + 0c6bf6b commit a8597a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/parsers/minecraft/nbt-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ function parsePath(reader: StringReader): ReturnedInfo<PathParseResult> {
}
return helper.fail();
}
} else if (reader.peek() === " ") {
return helper.succeed(result);
} else {
return helper.fail(
exceptions.BAD_CHAR.create(
Expand Down
4 changes: 1 addition & 3 deletions src/parsers/minecraft/scoreboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,7 @@ export const criteriaParser: Parser = {
const result = parseNamespaceOption(
reader,
stringArrayToNamespaces([
...info.data.globalData.registries[
"minecraft:entity_type"
]
...info.data.globalData.registries["minecraft:item"]
]),
CompletionItemKind.Reference,
"."
Expand Down

0 comments on commit a8597a9

Please sign in to comment.