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
andcommittedApr 27, 2019
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 <mspacedev1@gmail.com>
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

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/parsers/minecraft/nbt-path.ts

+2
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

+1-3
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)