diff --git a/prismarine-viewer/examples/newStats.ts b/prismarine-viewer/examples/newStats.ts index 23b9b2af..fb363484 100644 --- a/prismarine-viewer/examples/newStats.ts +++ b/prismarine-viewer/examples/newStats.ts @@ -15,6 +15,7 @@ export const addNewStat = (id: string, width = 80, x = rightOffset, y = 0) => { pane.style.fontFamily = 'monospace' pane.style.fontSize = '12px' pane.style.zIndex = '10000' + pane.style.pointerEvents = 'none' document.body.appendChild(pane) stats[id] = pane if (y === 0) { // otherwise it's a custom position diff --git a/src/react/CreateWorld.tsx b/src/react/CreateWorld.tsx index ceed77ec..87b36777 100644 --- a/src/react/CreateWorld.tsx +++ b/src/react/CreateWorld.tsx @@ -8,17 +8,19 @@ import styles from './createWorld.module.css' // const worldTypes = ['default', 'flat', 'largeBiomes', 'amplified', 'customized', 'buffet', 'debug_all_block_states'] const worldTypes = ['default', 'flat'/* , 'void' */] +const gameModes = ['survival', 'creative'/* , 'adventure', 'spectator' */] export const creatingWorldState = proxy({ title: '', type: worldTypes[0], + gameMode: gameModes[0], version: '' }) export default ({ cancelClick, createClick, customizeClick, versions, defaultVersion }) => { const [quota, setQuota] = useState('') - const { title, type, version } = useSnapshot(creatingWorldState) + const { title, type, version, gameMode } = useSnapshot(creatingWorldState) useEffect(() => { creatingWorldState.version = defaultVersion void navigator.storage?.estimate?.().then(({ quota, usage }) => { @@ -54,9 +56,15 @@ export default ({ cancelClick, createClick, customizeClick, versions, defaultVer - + {/* */} +