The complete migration from `minecraft-assets` to [`mc-assets`](https://npmjs.com/mc-assets). Now all block states & block models are processed dynamically! So it is now easily possible to implement custom models - no post-install work anymore: the building is now 3x faster and 4x faster in docker - drop 10x total deploy size - display world ~1.5x faster - fix snow & repeater state parser (they didn't render correctly) rsbuild pipeline! - the initial app load is faster ~1.2 - much fewer requests are made & cached - dev reloads are fast now Resource pack changes: - now textures are reloaded much more quickly on the fly - add hotkey to quickly reload textures (for debugging) assigned to F3+T (open dev widget is now assigned to F3+Y) - add a way to disable resource pack instead of uninstalling it - items render from resource pack are now support - resource pack widgets & icons are now supported
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# Minecraft React
|
|
|
|
Minecraft UI components for React extracted from [mcraft.fun](https://mcraft.fun) project.
|
|
|
|
```bash
|
|
pnpm i minecraft-react
|
|
```
|
|
|
|

|
|
|
|
## Usage
|
|
|
|
```jsx
|
|
import { Scoreboard } from 'minecraft-react'
|
|
|
|
const App = () => {
|
|
return (
|
|
<Scoreboard
|
|
open
|
|
title="Scoreboard"
|
|
items={[
|
|
{ name: 'Player 1', value: 10 },
|
|
{ name: 'Player 2', value: 20 },
|
|
{ name: 'Player 3', value: 30 },
|
|
]}
|
|
/>
|
|
)
|
|
}
|
|
```
|
|
|
|
See [Storybook](https://mcraft.fun/storybook/) or [Storybook (Mirror link)](https://mcon.vercel.app/storybook/) for more examples and full components list. Also take a look at the full [standalone example](https://github.com/zardoy/minecraft-web-client/tree/experiments/UiStandaloneExample.tsx).
|
|
|
|
There are two types of components:
|
|
|
|
- Small UI components or HUD components
|
|
- Full screen components (like sign editor, worlds selector)
|