React library to use Minecraft assets (icons, sounds) in your applications.
This library is available on npm as @xefreh/minecraft-assets-react.
For usage instructions, see the package README
minecraft-assets-react/
├── apps/
│ └── web/ # Demo application
├── packages/
│ ├── ui/ # React components (MinecraftIcon, MinecraftSound, usePlaySound)
│ └── assets-extractor/ # Minecraft assets extraction tool
bun installcd packages/ui
bun run buildcd apps/web
bun run devThe app will be available at http://localhost:3000
If you want to update assets from a new Minecraft version:
# 1. Extract assets from the latest Minecraft version
bun run extract
# 2. Rebuild the UI package to include the new assets
cd packages/ui
bun run buildThis will download and extract textures and sounds from the latest Minecraft version, then bundle them into the UI package.
npm install @xefreh/minecraft-assets-reactimport { MinecraftIcon, MinecraftSound, usePlaySound } from '@xefreh/minecraft-assets-react';
import { diamond, diamond_sword } from '@xefreh/minecraft-assets-react/items';
import { stone, dirt } from '@xefreh/minecraft-assets-react/blocks';
import records_cat from '@xefreh/minecraft-assets-react/sounds/records_cat';
import damage_hit1 from '@xefreh/minecraft-assets-react/sounds/damage_hit1';
// Display an icon
<MinecraftIcon src={diamond} alt="Diamond" size={64} />
// Audio player
<MinecraftSound src={records_cat} />
// Play a sound programmatically
const hitSound = usePlaySound(damage_hit1);
hitSound.play({ volume: 0.8 });Note: This package is optimized for Vite. See the package README for more details.