Item entities
This commit is contained in:
@@ -6,6 +6,8 @@ import { get_sprite_region } from "$/client/sprites.ts";
|
||||
import type { MultiPlayerGameMode } from "$/client/game_mode.ts";
|
||||
import type { Entity } from "$/client/entity/entity.ts";
|
||||
import { RemotePlayer } from "$/client/entity/remote_player.ts";
|
||||
import { ItemEntity } from "$/client/entity/item_entity.ts";
|
||||
import { render_item_entity } from "./item_renderer.ts";
|
||||
import {
|
||||
draw_terrain,
|
||||
flush_batch,
|
||||
@@ -84,7 +86,14 @@ export class LevelRenderer {
|
||||
render_player(entity, partial_tick);
|
||||
}
|
||||
}
|
||||
flush_batch();
|
||||
|
||||
set_current_texture(level.image.tex);
|
||||
for (const entity of level.entities.values()) {
|
||||
if (entity instanceof ItemEntity) {
|
||||
render_item_entity(entity, partial_tick);
|
||||
}
|
||||
}
|
||||
flush_batch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user