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

Commit a8597a9

Browse files
bors[bot]MSpaceDev
andcommitted
Merge #135
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]>
2 parents 2053e6b + 0c6bf6b commit a8597a9

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parsers/minecraft/nbt-path.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,8 @@ function parsePath(reader: StringReader): ReturnedInfo<PathParseResult> {
683683
}
684684
return helper.fail();
685685
}
686+
} else if (reader.peek() === " ") {
687+
return helper.succeed(result);
686688
} else {
687689
return helper.fail(
688690
exceptions.BAD_CHAR.create(

src/parsers/minecraft/scoreboard.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,7 @@ export const criteriaParser: Parser = {
285285
const result = parseNamespaceOption(
286286
reader,
287287
stringArrayToNamespaces([
288-
...info.data.globalData.registries[
289-
"minecraft:entity_type"
290-
]
288+
...info.data.globalData.registries["minecraft:item"]
291289
]),
292290
CompletionItemKind.Reference,
293291
"."

0 commit comments

Comments
 (0)