Curios slots rendering !
This commit is contained in:
@@ -7,7 +7,9 @@ import { AssetManager } from "$/client/assets.ts";
|
||||
import type { LocalPlayer } from "$/client/entity/local_player.ts";
|
||||
import { begin_view_model, end_mode_3d, flush_batch, set_current_texture, Texture } from "$/client/renderer/mod.ts";
|
||||
import { item_block, push_item } from "./item_renderer.ts";
|
||||
import { push_cube, right_arm, type Vec3 } from "./player_renderer.ts";
|
||||
import { push_cube, type Vec3 } from "./player_renderer.ts";
|
||||
import { right_arm } from "./player_model.ts";
|
||||
import { render_worn_arm } from "./worn_renderer.ts";
|
||||
import { entity_tint } from "./entity_light.ts";
|
||||
|
||||
// wider than the world's field of view, like minecraft's fixed 70 degrees for the hand
|
||||
@@ -62,6 +64,12 @@ export class HandRenderer {
|
||||
set_current_texture(skin.tex);
|
||||
push_cube(skin, arm, arm.texture, 0, transform, tint);
|
||||
push_cube(skin, arm, arm.overlay, arm.inflate, transform, tint);
|
||||
// what's worn on it goes over it, from the atlas
|
||||
if (player.worn.length > 0) {
|
||||
flush_batch();
|
||||
set_current_texture(AssetManager.instance.get<Texture>("bworld:textures").tex);
|
||||
render_worn_arm(player, transform, tint);
|
||||
}
|
||||
}
|
||||
flush_batch();
|
||||
end_mode_3d();
|
||||
|
||||
Reference in New Issue
Block a user