mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
feat: item models generation simple & remove core:item_models
This commit is contained in:
parent
7a5fe3b2b0
commit
fae372d19f
16 changed files with 136 additions and 63 deletions
|
|
@ -161,9 +161,9 @@ void SlotView::draw(const DrawContext* pctx, Assets* assets) {
|
|||
|
||||
auto& item = indices->items.require(stack.getItemId());
|
||||
switch (item.iconType) {
|
||||
case item_icon_type::none:
|
||||
case ItemIconType::NONE:
|
||||
break;
|
||||
case item_icon_type::block: {
|
||||
case ItemIconType::BLOCK: {
|
||||
const Block& cblock = content->blocks.require(item.icon);
|
||||
batch->texture(previews->getTexture());
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ void SlotView::draw(const DrawContext* pctx, Assets* assets) {
|
|||
0, 0, 0, region, false, true, tint);
|
||||
break;
|
||||
}
|
||||
case item_icon_type::sprite: {
|
||||
case ItemIconType::SPRITE: {
|
||||
size_t index = item.icon.find(':');
|
||||
std::string name = item.icon.substr(index+1);
|
||||
UVRegion region(0.0f, 0.0, 1.0f, 1.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue