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
+9 -3
View File
@@ -8,7 +8,14 @@ import { mat4, vec3 } from "gl-matrix";
import type { ItemStack } from "$/common/inventory.ts";
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 {
begin_view_model,
end_mode_3d,
flush_batch,
set_current_texture,
Texture,
use_texture,
} from "$/client/renderer/mod.ts";
import { item_block, push_item } from "./item_renderer.ts";
import { push_cube, type Vec3 } from "./player_renderer.ts";
import { right_arm } from "./player_model.ts";
@@ -69,8 +76,7 @@ export class HandRenderer {
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);
use_texture(AssetManager.instance.get<Texture>("bworld:textures").tex);
render_worn_arm(player, transform, tint);
}
}