mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00
parent
178489b044
commit
d215755415
@ -85,7 +85,7 @@ pub fn init(pos: Vec2f, itemStack: ItemStack, vtable: *const VTable, userData: u
|
||||
.vtable = vtable,
|
||||
.userData = userData,
|
||||
.pos = pos,
|
||||
.text = try TextBuffer.init(main.globalAllocator, std.fmt.bufPrint(&buf, "{}", .{self.itemStack.amount}) catch "∞", .{}, false, .right),
|
||||
.text = try TextBuffer.init(main.globalAllocator, std.fmt.bufPrint(&buf, "{}", .{itemStack.amount}) catch "∞", .{}, false, .right),
|
||||
.texture = texture.value(),
|
||||
.mode = mode,
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ pub fn onOpen() Allocator.Error!void {
|
||||
for(0..8) |_| {
|
||||
if(i >= items.items.len) break;
|
||||
const item = items.items[i];
|
||||
try row.add(try ItemSlot.init(.{0, 0}, .{.item = item, .amount = item.stackSize()}, &.{.tryTakingItems = &tryTakingItems}, i, .default, .takeOnly));
|
||||
try row.add(try ItemSlot.init(.{0, 0}, .{.item = item, .amount = 1}, &.{.tryTakingItems = &tryTakingItems}, i, .default, .takeOnly));
|
||||
i += 1;
|
||||
}
|
||||
try list.add(row);
|
||||
|
Loading…
x
Reference in New Issue
Block a user