ItemSpriteFactory { public static final BufferedImage createSprite(ItemProvider itemProvider, ModelProvider modelProvider, SpriteProvider spriteProvider, TextureProvider textureProvider, int itemId, int quantity, int border, int shadowColor, boolean noted) throws IOException { SpritePixels spritePixels = createSpritePixels(itemProvider, modelProvider, spriteProvider, textureProvider, itemId, quantity, border, shadowColor, noted); return spritePixels == null ? null : spritePixels.toBufferedImage(); }  static final BufferedImage createSprite(ItemProvider itemProvider, ModelProvider modelProvider,
		SpriteProvider spriteProvider, TextureProvider textureProvider,
		int itemId, int quantity, int border, int shadowColor,
		boolean noted);  }
@Test @Ignore public void test() throws IOException { File base = StoreLocation.LOCATION, outDir = folder.newFolder(); int count = 0; try (Store store = new Store(base)) { store.load(); ItemManager itemManager = new ItemManager(store); itemManager.load(); ModelProvider modelProvider = new ModelProvider() { @Override public ModelDefinition provide(int modelId) throws IOException { Index models = store.getIndex(IndexType.MODELS); Archive archive = models.getArchive(modelId); byte[] data = archive.decompress(store.getStorage().loadArchive(archive)); ModelDefinition inventoryModel = new ModelLoader().load(modelId, data); return inventoryModel; } }; SpriteManager spriteManager = new SpriteManager(store); spriteManager.load(); TextureManager textureManager = new TextureManager(store); textureManager.load(); for (ItemDefinition itemDef : itemManager.getItems()) { if (itemDef.name == null || itemDef.name.equalsIgnoreCase("null")) { continue; } try { BufferedImage sprite = ItemSpriteFactory.createSprite(itemManager, modelProvider, spriteManager, textureManager, itemDef.id, 1, 1, 3153952, false); File out = new File(outDir, itemDef.id + ".png"); BufferedImage img = sprite; ImageIO.write(img, "PNG", out); ++count; } catch (Exception ex) { log.warn("error dumping item {}", itemDef.id, ex); } } } log.info("Dumped {} item images to {}", count, outDir); }