Skip to content

Commit

Permalink
fix more grass block item render and remove misleading sounds warning
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Aug 12, 2024
1 parent dd28554 commit 39ccf84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"http-browserify": "^1.7.0",
"http-server": "^14.1.1",
"https-browserify": "^1.0.0",
"mc-assets": "^0.2.10",
"mc-assets": "^0.2.11",
"minecraft-inventory-gui": "github:zardoy/minecraft-inventory-gui#next",
"mineflayer": "github:zardoy/mineflayer",
"mineflayer-pathfinder": "^2.4.4",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ import { fsState } from './loadSave'
import { watchFov } from './rendererUtils'
import { loadInMemorySave } from './react/SingleplayerProvider'

import { downloadSoundsIfNeeded, earlyCheck as earlySoundsMapCheck } from './soundSystem'
import { downloadSoundsIfNeeded } from './soundSystem'
import { ua } from './react/utils'
import { handleMovementStickDelta, joystickPointer } from './react/TouchAreasControls'
import { possiblyHandleStateVariable } from './googledrive'
Expand Down Expand Up @@ -552,7 +552,6 @@ async function connect (connectOptions: ConnectOptions) {
// "mapDownloader-saveInternal": false, // do not save into memory, todo must be implemeneted as we do really care of ram
}) as unknown as typeof __type_bot
window.bot = bot
earlySoundsMapCheck()
customEvents.emit('mineflayerBotCreated')
if (singleplayer || p2pMultiplayer) {
// in case of p2pMultiplayer there is still flying-squid on the host side
Expand Down
13 changes: 0 additions & 13 deletions src/soundSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,6 @@ subscribeKey(miscUiState, 'gameLoaded', async () => {
// }
// }

export const earlyCheck = () => {
const { allSoundsMap } = globalObject
if (!allSoundsMap) return

// todo also use major versioned hardcoded sounds
const soundsMap = allSoundsMap[bot.version]

if (!soundsMap) {
console.warn('No sounds map for version', bot.version, 'supported versions are', Object.keys(allSoundsMap).join(', '))
showNotification('Warning', 'No sounds map for version ' + bot.version)
}
}

const getVersionedSound = (version: string, item: string, itemsMapSortedEntries: Array<[string, string[]]>) => {
const verNumber = versionToNumber(version)
for (const [itemsVer, items] of itemsMapSortedEntries) {
Expand Down

0 comments on commit 39ccf84

Please sign in to comment.