Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: minimap and full screen map (disabled by default) #147

Merged
merged 308 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 210 commits
Commits
Show all changes
308 commits
Select commit Hold shift + click to select a range
254013f
canvases container
Jul 10, 2024
738ed8c
drawing new canvas after map move
Jul 10, 2024
524e802
drawing new canvas on move
Jul 10, 2024
5859979
map is drawing on mouse move. Not finished: scaling ruins the positio…
Jul 10, 2024
a569732
full map with overlapping canvases
Jul 11, 2024
52f1f79
new factor
Jul 11, 2024
35439b7
observer component
Jul 11, 2024
0635a94
fixed map offset when scaled
Jul 11, 2024
4553d03
warp is drawing on right place in fullmap
Jul 11, 2024
629f6b2
warps are not cut in fullmap
Jul 11, 2024
8ebcdfd
canvases clean up
Jul 11, 2024
713446e
add new warp on left click. Fix required: wrong coords on click
Jul 11, 2024
9009302
wrong coords on click fixed
Jul 11, 2024
f523652
new formulas on click. Probelem: if bot is not in the center then cli…
Jul 12, 2024
00d6e1a
fixed click on map. Problem: wrong click coords when scale is applyed
Jul 12, 2024
8f02507
Merge branch 'minimap' into fullmap_grid
Jul 12, 2024
5b5cdcd
map cell component
Jul 14, 2024
90713da
grid is drawing
Jul 14, 2024
99e5fdf
grid is drawing
Jul 15, 2024
dc2c780
warp do set on click. Some clean up required but works fine
Jul 15, 2024
42448d3
mapcell to mapchunk
Jul 15, 2024
9c1ef2c
map offset to point in the middle
Jul 16, 2024
b864161
basic shading
Jul 16, 2024
b5e2d8c
smother spinning
Jul 16, 2024
780aefd
fix rotation
Jul 17, 2024
20a4352
fix misclick for set warp
Jul 17, 2024
9dbe0bc
fix offset for warps on minimap
Jul 17, 2024
85ae150
dont rotate
Jul 17, 2024
0dcf490
added async
Jul 17, 2024
1ec56ff
coords fix
Jul 17, 2024
b109627
fix for infinite loop if no blocks
Jul 17, 2024
e5e5e24
resolve conf
Jul 17, 2024
007b959
Merge branch 'minimap_async' into minimap
Jul 17, 2024
cae8cf9
remove gb
Jul 17, 2024
a527d94
full map bigger + minimap rotate
Jul 17, 2024
44254ea
async chunk loading for localplayer. Required: move "this" out of async
Jul 18, 2024
9aeb23b
async chunks loading for localplayer. Fix required: map isnt drawing …
Jul 18, 2024
8c0ade9
new grey color for not existing blocks
Jul 18, 2024
fc06262
parts of world and warps on a separate canvas
Jul 19, 2024
02b5da9
warp pos on click fix
Jul 19, 2024
3eedee8
add highest block implementation
zardoy Jul 22, 2024
05f0131
some minor fixes
Jul 19, 2024
ccc6cd8
add gzip size logging which is actually more important than regular s…
zardoy Jul 19, 2024
30f6e75
toggle full map in provider
Jul 22, 2024
922e3ec
highest block from viewer
Jul 22, 2024
5873ee2
skip unused map updates
Jul 22, 2024
f81ba6d
show minimap setting
Jul 22, 2024
112b044
setting to enable fullmap and minimap
Jul 22, 2024
3f7e7e6
position coords
Jul 22, 2024
406e63b
small cleanup
Jul 22, 2024
ac071b0
app controls in provider
Jul 22, 2024
4cbc710
double links for discord
Jul 22, 2024
a9fa8a7
dropdown discord button in main menu and pause screen
Jul 22, 2024
3959bb2
no context reset
Jul 23, 2024
da094bd
100% map for small screens
Jul 24, 2024
54f96cd
close button for small screen
Jul 24, 2024
1e089dc
merge next
Jul 24, 2024
da4c72b
faster minimap loading
Jul 24, 2024
f0dacff
fix zooming on desktop Still mobiles doesnt work
zardoy Aug 1, 2024
dc4b989
fix crash on loading
Jul 24, 2024
9e6733e
chunk coords
Jul 29, 2024
aa49f7c
minimap with scale and fullmap without scale
Aug 2, 2024
bf04279
fullmap adjustements
Aug 2, 2024
5651670
set warp scale
Aug 2, 2024
8c4ad6b
merge next
Aug 5, 2024
e794274
fix set warp on full map
Aug 5, 2024
fd4cbc5
complete fix for set warp on click
Aug 6, 2024
6f2e188
known issue: warps dont draw on minimap on server
Aug 6, 2024
f7cede3
persist warps
Aug 6, 2024
bed71db
fix warp info width
Aug 6, 2024
82bed0b
sync warps for fullmap and minimap on server
Aug 6, 2024
d3bac9f
reset warp on click
Aug 7, 2024
c07fe35
api to delete warp required
Aug 7, 2024
704595c
resolve
Aug 7, 2024
b5d667c
fix build
Aug 7, 2024
8dd0caf
fix no idleCallback on mobile
Aug 8, 2024
87d0660
fix build
Aug 8, 2024
939501e
remove idleCallback completely
Aug 8, 2024
b69c082
fix build
Aug 8, 2024
ea1b5b4
right check for requestIdleCallback
Aug 8, 2024
17ae35e
delete warp functionality
Aug 8, 2024
648a937
some fixes
Aug 8, 2024
1fb69f8
set warp on long touch for mobile
Aug 8, 2024
ffbc9cc
Problem: warps are not synced when updated through command line
Aug 8, 2024
0bbbfe9
sync server warps with map
Aug 8, 2024
96c759f
warp preview on mouse over
Aug 8, 2024
b6d5b16
persist warps on server
Aug 9, 2024
53700c9
refactor
Aug 9, 2024
692424e
clean up
Aug 9, 2024
4311a4b
resolve most warnings
Aug 9, 2024
4c82794
move await out of the loop
Aug 9, 2024
e232ef4
skip updateing pixels when drawing
Aug 9, 2024
4b91e70
warp info mobile scale fixed
Aug 12, 2024
e24561b
roll back react zoom pan pinch
Aug 12, 2024
0b19bd7
fix fullmap scrolling issue
Aug 12, 2024
4d254ad
Merge branch 'next' into pr/gguio/147
zardoy Aug 22, 2024
a0ddf49
lint
zardoy Aug 26, 2024
9645e6a
loading takes a lot of time + colors are not correct
Aug 28, 2024
417c03f
fullmap fix
Aug 28, 2024
e3cb8be
chunks loading queue added
Aug 28, 2024
e22ecd9
hightest block fix
Aug 28, 2024
9c340a6
viewer fix
Aug 28, 2024
abf7ddb
chunks drawing in localplayer
Aug 28, 2024
2bda145
delete old chunks
Aug 28, 2024
a44f454
do not duplicate invisible blocks definition 4 times across the codeb…
zardoy Aug 28, 2024
f494823
add missing file
zardoy Aug 28, 2024
59cd1e4
fullmap for localplayer updates
Aug 28, 2024
4f70b62
clear chunk store
Aug 28, 2024
c00ff7f
chunks loading queue
Aug 28, 2024
c322b00
Merge branch 'minimap_useLocalChunks' into minimap
Aug 28, 2024
4918650
fix some canvas didnt render
Aug 28, 2024
de1698a
minimap always uses viewer
Aug 28, 2024
0b7fd02
preflat to define block name in localplayer
Aug 28, 2024
055aad2
using preflat on server
Aug 28, 2024
c690619
replaceAll fix
Aug 28, 2024
717baac
Merge branch 'next' into minimap
zardoy Aug 28, 2024
40939d2
unreachable chunks are transparent
Aug 28, 2024
01dd55f
unreachable chunks are transparent
Aug 28, 2024
94055fa
shadows on fullmap
Aug 28, 2024
b38575d
resolve
Aug 28, 2024
c4673bb
global warps in gameAdditionalState
Aug 28, 2024
a028421
Merge branch 'next' into pr/gguio/147
zardoy Aug 29, 2024
93d1243
fix colors for newer versions
Aug 30, 2024
86a55b5
fix lines in fullmap
Aug 30, 2024
79ca470
player pos on different canvas
Aug 31, 2024
b4cae86
player pos on minimap. Fix required: no player marker on fullmap
Aug 31, 2024
c1cb32c
delete canvases offscreen
Sep 2, 2024
d3ea29f
fix top left chunks loading in fullmap
Sep 2, 2024
5cf1c52
player pos on full map
Sep 2, 2024
0145267
outline for coords in minimap
Sep 2, 2024
32ce704
bigger scale for player pos on full map
Sep 2, 2024
2b0699a
fix default value error in input
Sep 2, 2024
acea2be
warps update in fullmap
Sep 2, 2024
338ec03
delete updates fullmap. Fixes required: drawing warps causes lagging …
Sep 2, 2024
79ca818
small fixes
Sep 3, 2024
65a8868
clean up
Sep 3, 2024
15bcf3d
fix coords on fullmap are broken
Sep 3, 2024
41f0a83
interface fixes on set warp window
Sep 3, 2024
4bb87dd
quick tp
Sep 3, 2024
51c5274
Merge branch 'next' into minimap
gguio Sep 3, 2024
2518dbc
move bot from fullmap
Sep 3, 2024
ec597b0
using BlockData for old versions
Sep 3, 2024
f5a25e7
fix low version colors
Sep 3, 2024
54b6dd6
Update Input.tsx
zardoy Sep 3, 2024
7193658
Merge branch 'next' into minimap
zardoy Sep 8, 2024
c9da8aa
input fix
Sep 3, 2024
9ad86b1
small
Sep 11, 2024
7ee8d8e
higher tp
Sep 11, 2024
5de334a
fix build
Sep 11, 2024
8a88128
exclude rsbuildSharedConfig
Sep 11, 2024
643c02c
attempt to fix build 1
Sep 11, 2024
018fc0c
fix quick tp
Sep 11, 2024
4d39a96
Merge remote-tracking branch 'origin/next' into pr/gguio/147
zardoy Sep 11, 2024
5f64e7b
revert mainmenu
zardoy Sep 11, 2024
fda6db7
Fix Setting, [perf] do not update minimap twice and do not update at …
zardoy Sep 11, 2024
77b011a
using heightmaps when possible
Sep 12, 2024
c449391
clean up for heightmap
Sep 12, 2024
3e26f4c
Merge branch 'next' into minimap
Sep 16, 2024
2cb3a15
fixed heightmap name
Sep 16, 2024
6415ada
heightmap is better found
Sep 16, 2024
a7ad5c7
fix heightmap search
Sep 16, 2024
9b499cc
fix chunks coords in heightmap
Sep 16, 2024
e107583
heightmap y fix
Sep 16, 2024
a7aac8b
fix open fullmap on mobile
Sep 16, 2024
a6d6818
Y in position
Sep 16, 2024
a4ea914
player position on minimap is stable
Sep 23, 2024
c707d09
fix color picker for ios
Sep 23, 2024
5e32e38
small color picker
Sep 23, 2024
6132d9f
better alignment for color picker
Sep 23, 2024
27a2976
faster map redraw
Sep 23, 2024
dd28a13
Merge branch 'next' into minimap
Sep 27, 2024
e28c114
massive refactor of minimapDrawer
Sep 30, 2024
974a3dc
viewer changes
Sep 30, 2024
8acf7ab
works but map is transparent
Sep 30, 2024
f731f87
fix wrong chunks in view
Oct 1, 2024
8d01117
chunkStore to map
Oct 1, 2024
3e44485
chunks store clear
Oct 1, 2024
8430a17
shadows
Oct 1, 2024
2349e23
fullmap support
Oct 4, 2024
9c19587
different load chunk funcs for fullmap and minimap
Oct 7, 2024
3711b90
fullmap loads in singlplayer
Oct 8, 2024
9d3da44
small clean up
Oct 8, 2024
0a3ed56
mapDrawer moved in addapter
Oct 8, 2024
01fdde0
fullmap loading in singleplayer
Oct 8, 2024
b5e9490
loading heightmap from region if possible
Oct 10, 2024
d352038
fix minimap on server
Oct 10, 2024
b1e7c67
fix fullmap on server
Oct 10, 2024
9d11a17
regular heightmap for fullmap
Oct 10, 2024
6e36847
fix build
Oct 10, 2024
9a46976
Merge branch 'next' into m_opt
Oct 10, 2024
5520778
fix viewer
Oct 10, 2024
223c7cc
fix chunk coords in region
Oct 10, 2024
4be98a8
chunk is loading from heightmap in greenfield
Oct 17, 2024
7a5ef7f
fix region
Oct 18, 2024
d9213f0
Merge branch 'next' into minimap
zardoy Oct 20, 2024
1976eb9
feat: add a setting to either completely hide perf stats or enable mo…
zardoy Oct 20, 2024
64dcd88
fix: fix crafting in singleplayer
zardoy Oct 20, 2024
33961d0
update types after minecraft-data types update
zardoy Oct 20, 2024
4c6117d
restore a way t ocreate worlds by enter
zardoy Oct 20, 2024
49102bd
fix: improve playground by allowing sync world for fast iterating of …
zardoy Oct 22, 2024
a3c8dbe
quickly copy your positions with `/pos` in singleplayer
zardoy Oct 22, 2024
c248acc
autodeploy PRs (#218)
zardoy Oct 22, 2024
46b7c20
fix: correct syntax for checking PR numbers in AUTO_DEPLOY_PRS in pre…
zardoy Oct 22, 2024
fe447a7
ci: update variable name from env to vars in AUTO_DEPLOY_PRS check in…
zardoy Oct 22, 2024
fcc07df
ci: simplify PR number check logic using fromJSON in AUTO_DEPLOY_PRS …
zardoy Oct 22, 2024
ccdf736
ci: refactor variable usage from env to vars for PR check in preview.yml
zardoy Oct 22, 2024
2685f23
ci: enhance trigger conditions for deployment in preview.yml using va…
zardoy Oct 22, 2024
50aec6a
ci: add push event trigger and refine deployment conditions in previe…
zardoy Oct 22, 2024
4e3a4d4
check that!
zardoy Oct 22, 2024
8734a3b
ci: trying to fix auto preview workflow! (#221)
zardoy Oct 22, 2024
0964d67
ci: update event trigger from pull_request to pull_request_target in …
zardoy Oct 22, 2024
656a1db
ci: refactor deployment workflow in preview.yml by removing unused ch…
zardoy Oct 22, 2024
d210aa4
fix: don’t display advanced stats on prod deploy
zardoy Oct 24, 2024
474aaff
fix: never get stuck in unloaded chunks! @sa2urami
zardoy Oct 28, 2024
21cf365
feat: 1.21.1 support
zardoy Oct 28, 2024
c10c938
ci: fix lint
zardoy Oct 28, 2024
4a79840
should fix publishing to npm
zardoy Oct 28, 2024
db569c2
fix: don't crash and conflict with g663 spyware installed
zardoy Oct 30, 2024
34be348
fix: fix some blocks were rendered as transparent in old versions. Sp…
zardoy Oct 30, 2024
6ab4aa1
fix: some areas in old world were competely white
zardoy Oct 30, 2024
dfec632
feat: optimize slabs render performance by rendering less not visible…
zardoy Oct 30, 2024
63c8c49
feat: turn back smooth lighting on old maps
zardoy Oct 30, 2024
3d58185
feat: server resource packs (#215)
zardoy Oct 30, 2024
049e6c4
fix: don't make text move in loading screens
zardoy Oct 30, 2024
2e5e1bd
fix: (latest) or (offline) status text was not displayed sometimes af…
zardoy Oct 30, 2024
09ee9f6
fix: don't reset the world in mesher after resourece pack textures up…
zardoy Oct 30, 2024
30bf7b8
feat: format disconnect messages from minecraft servers (display corr…
zardoy Oct 31, 2024
570edde
feat: write published version name on prod website!
zardoy Nov 1, 2024
41b7d48
fix: fix entities display on old versions like 1.8
zardoy Nov 2, 2024
a6d5a6f
spectator gamemode fixes
zardoy Nov 2, 2024
b2cc805
fix: fix display names in inventories on 1.8
zardoy Nov 2, 2024
eba6bf3
fix auth err message
zardoy Nov 3, 2024
dd4788d
send connecting version to auth endpoint
zardoy Nov 3, 2024
1fa5bcf
do a restoredData validation
zardoy Nov 3, 2024
a8aec5f
fix the auth check
zardoy Nov 3, 2024
e207a89
fox issues with chat on 1.8
zardoy Nov 5, 2024
8f69b60
hotfix: disable fly after going out of spectator mode
zardoy Nov 5, 2024
ef748ee
ci: fix release info writing
zardoy Nov 5, 2024
a664503
update npm banner to a working one
zardoy Nov 5, 2024
2dc3463
feat: allow singleplayer mode to be triggered by 'sp=1' query paramet…
zardoy Nov 7, 2024
5c64576
docs: add deploy to Koyeb button
zardoy Nov 9, 2024
1b07550
feat: implement experimental clipWorldBelowY setting for testing
zardoy Nov 9, 2024
da8ffc2
fix: Error messages were not displayed after unsuccessful Microsoft a…
zardoy Nov 10, 2024
35e2433
last version
Nov 10, 2024
43954bb
Merge branch 'next' into pr/gguio/147
zardoy Nov 26, 2024
bfb6b6d
fix minimap crashes
zardoy Nov 26, 2024
99bd67f
not render components when not active to regress the performance
zardoy Nov 26, 2024
b8a75e4
fix test
zardoy Nov 26, 2024
5b774f8
fix lint
zardoy Nov 26, 2024
87bd991
restore
zardoy Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ rsbuild.config.ts
*.generated.ts
generated
public
**/*/rsbuildSharedConfig.ts
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"react-dom": "^18.2.0",
"react-select": "^5.8.0",
"react-transition-group": "^4.4.5",
"react-zoom-pan-pinch": "3.4.4",
"remark": "^15.0.1",
"sanitize-filename": "^1.6.3",
"skinview3d": "^3.0.1",
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions prismarine-viewer/viewer/lib/mesher/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import { BlockType } from '../../../examples/shared'
import { World, BlockModelPartsResolved, WorldBlock as Block } from './world'
import { BlockElement, buildRotationMatrix, elemFaces, matmul3, matmulmat3, vecadd3, vecsub3 } from './modelsGeometryCommon'
import { INVISIBLE_BLOCKS } from './worldConstants'
import { MesherGeometryOutput } from './shared'


let blockProvider: WorldBlockProvider

const tints: any = {}
Expand Down Expand Up @@ -126,7 +128,7 @@
}))
}

function renderLiquid (world: World, cursor: Vec3, texture: any | undefined, type: number, biome: string, water: boolean, attr: Record<string, any>) {

Check warning on line 131 in prismarine-viewer/viewer/lib/mesher/models.ts

View workflow job for this annotation

GitHub Actions / build-and-deploy

Function 'renderLiquid' has too many parameters (7). Maximum allowed is 4
const heights: number[] = []
for (let z = -1; z <= 1; z++) {
for (let x = -1; x <= 1; x++) {
Expand Down Expand Up @@ -198,7 +200,7 @@

let needRecompute = false

function renderElement (world: World, cursor: Vec3, element: BlockElement, doAO: boolean, attr: MesherGeometryOutput, globalMatrix: any, globalShift: any, block: Block, biome: string) {

Check warning on line 203 in prismarine-viewer/viewer/lib/mesher/models.ts

View workflow job for this annotation

GitHub Actions / build-and-deploy

Function 'renderElement' has too many parameters (9). Maximum allowed is 4
const position = cursor
// const key = `${position.x},${position.y},${position.z}`
// if (!globalThis.allowedBlocks.includes(key)) return
Expand Down Expand Up @@ -386,8 +388,6 @@
}
}

const invisibleBlocks = new Set(['air', 'cave_air', 'void_air', 'barrier'])

const isBlockWaterlogged = (block: Block) => block.getProperties().waterlogged === true || block.getProperties().waterlogged === 'true'

let unknownBlockModel: BlockModelPartsResolved
Expand Down Expand Up @@ -421,7 +421,7 @@
for (cursor.z = sz; cursor.z < sz + 16; cursor.z++) {
for (cursor.x = sx; cursor.x < sx + 16; cursor.x++) {
const block = world.getBlock(cursor)!
if (!invisibleBlocks.has(block.name)) {
if (!INVISIBLE_BLOCKS.has(block.name)) {
const highest = attr.highestBlocks[`${cursor.x},${cursor.z}`]
if (!highest || highest.y < cursor.y) {
attr.highestBlocks[`${cursor.x},${cursor.z}`] = {
Expand All @@ -430,7 +430,7 @@
}
}
}
if (invisibleBlocks.has(block.name)) continue
if (INVISIBLE_BLOCKS.has(block.name)) continue
if (block.name.includes('_sign') || block.name === 'sign') {
const key = `${cursor.x},${cursor.y},${cursor.z}`
const props: any = block.getProperties()
Expand Down Expand Up @@ -475,7 +475,7 @@
} else if (block.name === 'lava') {
renderLiquid(world, cursor, blockProvider.getTextureInfo('lava_still'), block.type, biome, false, attr)
}
if (block.name !== 'water' && block.name !== 'lava' && !invisibleBlocks.has(block.name)) {
if (block.name !== 'water' && block.name !== 'lava' && !INVISIBLE_BLOCKS.has(block.name)) {
// cache
let { models } = block
if (block.models === undefined) {
Expand Down
3 changes: 2 additions & 1 deletion prismarine-viewer/viewer/lib/mesher/test/tests.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from 'vitest'
import supportedVersions from '../../../../../src/supportedVersions.mjs'
import { INVISIBLE_BLOCKS } from '../worldConstants'
import { setup } from './mesherTester'

const lastVersion = supportedVersions.at(-1)
Expand All @@ -16,7 +17,7 @@ const addPositions = [

test('Known blocks are not rendered', () => {
const { mesherWorld, getGeometry, pos, mcData } = setup(lastVersion, addPositions as any)
const ignoreAsExpected = new Set(['air', 'cave_air', 'void_air', 'barrier', 'water', 'lava', 'moving_piston', 'light'])
const ignoreAsExpected = new Set([...INVISIBLE_BLOCKS, 'water', 'lava', 'moving_piston', 'light'])

let time = 0
let times = 0
Expand Down
1 change: 1 addition & 0 deletions prismarine-viewer/viewer/lib/mesher/worldConstants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const INVISIBLE_BLOCKS = new Set(['air', 'void_air', 'cave_air', 'barrier'])
1 change: 1 addition & 0 deletions src/controls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export const contro = new ControMax({
},
ui: {
back: [null/* 'Escape' */, 'B'],
toggleMap: ['KeyM'],
leftClick: [null, 'A'],
rightClick: [null, 'Y'],
speedupCursor: [null, 'Left Stick'],
Expand Down
2 changes: 2 additions & 0 deletions src/globalState.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//@ts-check

import { proxy, ref, subscribe } from 'valtio'
import { WorldWarp } from 'flying-squid/dist/lib/modules/warps'
import { pointerLock } from './utils'
import type { OptionsGroupType } from './optionsGuiScheme'

Expand Down Expand Up @@ -150,6 +151,7 @@ export const gameAdditionalState = proxy({
isFlying: false,
isSprinting: false,
isSneaking: false,
warps: [] as WorldWarp[]
})

window.gameAdditionalState = gameAdditionalState
Expand Down
21 changes: 21 additions & 0 deletions src/optionsGuiScheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,27 @@ export const guiOptionsScheme: {
],
},
},
{
custom () {
return <Category>Map</Category>
},
showMinimap: {
text: 'Show minimap',
values: [
'always',
'singleplayer',
'never'
],
},
showFullmap: {
text: 'Show fullmap',
values: [
'always',
'singleplayer',
'never'
],
},
},
{
custom () {
return <Category>Experimental</Category>
Expand Down
2 changes: 2 additions & 0 deletions src/optionsStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ const defaultOptions = {
/** Wether to popup sign editor on server action */
autoSignEditor: true,
wysiwygSignEditor: 'auto' as 'auto' | 'always' | 'never',
showMinimap: 'always' as 'always' | 'singleplayer' | 'never',
showFullmap: 'always' as 'always' | 'singleplayer' | 'never',
displayBossBars: false, // boss bar overlay was removed for some reason, enable safely
disabledUiParts: [] as string[],
neighborChunkUpdates: true
Expand Down
13 changes: 13 additions & 0 deletions src/react/Fullmap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.map {
width: 70% !important;
height: 80% !important;
border: 1px solid black;
}

@media (max-width: 500px) {
.map {
width: 100% !important;
height: 100% !important;
}
}
Loading
Loading