this.offset = offset;
widgets = new Widget[positions.length];
for (int i = 0; i < widgets.length; i++) {
final RenderSlot slot;
if (VanillaPlugin.getInstance().getEngine() instanceof Client) {
Widget widget = widgets[i] = ((Client) VanillaPlugin.getInstance().getEngine()).getScreenStack().createWidget();
slot = widget.add(RenderSlot.class);
slot.setPosition(positions[i]);
} else {
slot = new RenderSlot();
}
slot.setSlot(new Slot(inventory, i));