Skip to content

Commit

Permalink
updating sound diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Oct 28, 2021
1 parent 95492a2 commit c5b706f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Binary file modified src/Lib/Diagnostics/ResourcePack/Entity/entry.ts
Binary file not shown.
Binary file modified src/Lib/Diagnostics/ResourcePack/Sounds Definitions/entry.ts
Binary file not shown.
15 changes: 15 additions & 0 deletions src/Lib/Diagnostics/ResourcePack/Sounds/diagnostics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Types } from "bc-minecraft-bedrock-types";
import { DiagnosticsBuilder } from "../../../Types/DiagnosticsBuilder/DiagnosticsBuilder";
import { DiagnosticSeverity } from "../../../Types/DiagnosticsBuilder/Severity";

export function diagnose_resourcepack_sounds(data: Types.Definition | undefined, diagnoser: DiagnosticsBuilder): void {
if (data === undefined) return;

const pdata = diagnoser.context.getCache();

Types.Definition.forEach(data, (ref, id) => {
if (pdata.ResourcePacks.sounds.has(id)) return;

diagnoser.Add(ref + "/" + id, `Cannot find sound definition: ${id}`, DiagnosticSeverity.error, "resourpack.sound.missing");
});
}

0 comments on commit c5b706f

Please sign in to comment.