Item rendering
This commit is contained in:
@@ -132,7 +132,6 @@ export function convert_blockstate(location: string, json: unknown, read: ModelS
|
||||
if (Array.isArray(value) && value.length > 1) {
|
||||
warnings.add("random models were left out, the first is always used");
|
||||
}
|
||||
if (first.uvlock) warnings.add("uvlock was left out, so turned textures turn with their model");
|
||||
return first;
|
||||
};
|
||||
|
||||
@@ -184,7 +183,7 @@ export function convert_blockstate(location: string, json: unknown, read: ModelS
|
||||
// java takes -90 for 270
|
||||
const x = ((apply.x ?? 0) % 360 + 360) % 360;
|
||||
const y = ((apply.y ?? 0) % 360 + 360) % 360;
|
||||
return { model, ...(x ? { x } : {}), ...(y ? { y } : {}) };
|
||||
return { model, ...(x ? { x } : {}), ...(y ? { y } : {}), ...(apply.uvlock ? { uvlock: true } : {}) };
|
||||
};
|
||||
|
||||
const block: Record<string, unknown> = { id, textures: {} };
|
||||
@@ -249,9 +248,9 @@ export function convert_blockstate(location: string, json: unknown, read: ModelS
|
||||
return { kind: "block", id, json: { format_version: FORMAT_VERSION, block }, warnings: [...warnings] };
|
||||
}
|
||||
|
||||
// why the model kind won't have written a model for a block to be drawn with, if it won't: one the remaps skip, one
|
||||
// made by a loader (obj files, composites), one that doesn't exist, or minecraft's that no remap gives bworld's for
|
||||
function model_missing(from: string, id: string, read: ModelSource, remaps: Remaps): string | undefined {
|
||||
// why the model kind won't have written a model for a block or item to be drawn with, if it won't: one the remaps skip,
|
||||
// one made by a loader (obj files, composites), one that doesn't exist, or minecraft's that no remap gives bworld's for
|
||||
export function model_missing(from: string, id: string, read: ModelSource, remaps: Remaps): string | undefined {
|
||||
if (remaps.skip?.some((pattern) => new RegExp(pattern).test(from))) return "is skipped by the remaps";
|
||||
if (parse_location(from).namespace === "minecraft") {
|
||||
return id.startsWith("minecraft:") ? "is minecraft's, and no --remap names a bworld model for it" : undefined;
|
||||
|
||||
Reference in New Issue
Block a user