use of com.lowdragmc.lowdraglib.client.renderer.impl.BlockStateRenderer in project Multiblocked by Low-Drag-MC.
the class MBDBlockStateRenderer method createConfigurator.
@Override
public Supplier<IMultiblockedRenderer> createConfigurator(WidgetGroup parent, DraggableScrollableWidgetGroup group, IMultiblockedRenderer current) {
BlockSelectorWidget blockSelectorWidget = new BlockSelectorWidget(0, 1, true);
if (current instanceof BlockStateRenderer) {
blockSelectorWidget.setBlock(((BlockStateRenderer) current).blockInfo.getBlockState());
}
group.addWidget(blockSelectorWidget);
return () -> {
if (blockSelectorWidget.getBlock() == null) {
return null;
} else {
return new MBDBlockStateRenderer(blockSelectorWidget.getBlock());
}
};
}
Aggregations