Fishing !
This commit is contained in:
@@ -7,6 +7,7 @@ import type { ItemStack } from "$/common/inventory.ts";
|
||||
import { push_vertex, Texture } from "$/client/renderer/mod.ts";
|
||||
import { block_item_texture, cube_face_texture, cube_face_tint } from "$/common/block_models.ts";
|
||||
import { item_model } from "./item_model.ts";
|
||||
import { item_texture } from "$/common/utils.ts";
|
||||
|
||||
// how big items on the ground are drawn, minecraft's ground transform
|
||||
const BLOCK_SCALE = 0.25;
|
||||
@@ -113,11 +114,3 @@ function push_textured_quad(atlas: Texture, region: { x: number; y: number }, co
|
||||
push_vertex(px, py, pz, cu ? u1 : u0, cv ? v1 : v0, color[0], color[1], color[2], 1);
|
||||
}
|
||||
}
|
||||
|
||||
function item_texture(item: ItemStack) {
|
||||
const texture_id = EverythingRegistry.get<ItemRegistry>("items", item.type_id)?.texture_id;
|
||||
if (typeof texture_id === "function") {
|
||||
return texture_id(item);
|
||||
}
|
||||
return texture_id ?? "engine:missing";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user