Remove duplicate code

This commit is contained in:
2026-10-13 11:57:43 -03:00
parent dfc6a6d77b
commit 5165698fe3
50 changed files with 307 additions and 812 deletions
+1 -5
View File
@@ -7,7 +7,7 @@
import { EverythingRegistry } from "../everything_registry.ts";
import type { BlockRegistry } from "../everything_registry.ts";
import { CHUNK_HEIGHT, CHUNK_SIZE } from "../constants.ts";
import { ID_PATTERN, TAG_ID_PATTERN } from "../mod_data.ts";
import { ID_PATTERN, is_object, TAG_ID_PATTERN } from "../mod_data.ts";
import { list_matches } from "../tags.ts";
import { can_stand_on } from "../utils.ts";
import { AIR_ID } from "../protocol.ts";
@@ -598,7 +598,3 @@ function height_provider(json: unknown): IntProvider {
const span = anchor(object.max_inclusive) - min + 1;
return (chunk) => min + Math.floor(chunk.rng.next() * span);
}
function is_object(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}