Change the asset keys
This commit is contained in:
@@ -142,7 +142,7 @@ function draw_item_item(item: ItemStack, item_info: ItemRegistry, x: number, y:
|
||||
const draw = (texture_id: string, [r, g, b] = [1, 1, 1]) => {
|
||||
const sprite_region = get_sprite_region(texture_id);
|
||||
draw_texture_region(
|
||||
AssetManager.instance.get("bworld:textures"),
|
||||
AssetManager.instance.get("cubi:textures"),
|
||||
sprite_region.x,
|
||||
sprite_region.y,
|
||||
sprite_region.width,
|
||||
@@ -172,7 +172,7 @@ export function draw_fluid(fluid: FluidVariant, x: number, y: number, filled = 1
|
||||
const region = get_sprite_region(texture);
|
||||
const size = SLOT_SIZE - 6;
|
||||
draw_texture_region(
|
||||
AssetManager.instance.get("bworld:textures"),
|
||||
AssetManager.instance.get("cubi:textures"),
|
||||
region.x,
|
||||
region.y + region.height * (1 - done),
|
||||
region.width,
|
||||
@@ -212,7 +212,7 @@ const model_icons = new WeakMap<ItemModel, Float32Array>();
|
||||
|
||||
// an item's model in a slot: its faces that face the viewer, back to front
|
||||
function draw_item_model(model: ItemModel, x: number, y: number) {
|
||||
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
|
||||
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
|
||||
use_texture(atlas.tex);
|
||||
let icon = model_icons.get(model);
|
||||
if (!icon) {
|
||||
@@ -277,7 +277,7 @@ function draw_item_block(block_info: BlockRegistry, x: number, y: number) {
|
||||
const front_texture = cube_face_texture(block_info, "front");
|
||||
const left_texture = cube_face_texture(block_info, "side");
|
||||
|
||||
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
|
||||
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
|
||||
|
||||
const top = get_sprite_region(top_texture);
|
||||
const front = get_sprite_region(front_texture);
|
||||
|
||||
Reference in New Issue
Block a user