-
-
Notifications
You must be signed in to change notification settings - Fork 920
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 1.20.5 * lint * fix * update registry * update java * add debug * fix * debug * Update testCommon.js * update ci * add protodef AOT compile code * Update protodefCompile.js * Update testCommon.js * pitem, fix `login` event * debug * Update testCommon.js * Update package.json test * Update package.json * update test events * Update testCommon.js * update * fix pitem source * remove some debug logging * update * Fix trade test * remove manual protodef install from ci * remove unnecessary install in ci * change back version.js to support latest version * update deps * remove compile protocol in ci * bump to support 1.20.6 * in tests teleport to overworld to prevent nether test to break the environment * fix respawn in internal tests * use normal tp before 1.14 * lint * fix held item test * fix item drop internal test for 1.20.6 * cleanup --------- Co-authored-by: Romain Beaumont <romain.rom1@gmail.com>
- Loading branch information
1 parent
1c2a5c0
commit 44fad41
Showing
22 changed files
with
184 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ test/server_* | |
.vscode | ||
.DS_Store | ||
launcher_accounts.json | ||
data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
tasks: | ||
- command: npm install | ||
- command: npm install && sdk install java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
module.exports = inject | ||
|
||
function inject (bot) { | ||
if (bot.supportFeature('mcDataHasEntityMetadata')) { | ||
// this is handled inside entities.js. We don't yet have entity metadataKeys for all versions but once we do | ||
// we can delete the numerical checks here and in entities.js https://github.com/extremeheat/mineflayer/blob/eb9982aa04973b0086aac68a2847005d77f01a3d/lib/plugins/entities.js#L469 | ||
return | ||
} | ||
bot._client.on('entity_metadata', (packet) => { | ||
if (!bot?.entity?.id === packet?.entityId) return | ||
if (packet?.metadata[1]?.key === 1) { | ||
if (!packet?.metadata[1]?.value) return | ||
bot.oxygenLevel = Math.round(packet.metadata[1].value / 15) | ||
bot.emit('breath') | ||
} | ||
if (packet?.metadata[0]?.key === 1) { | ||
if (!packet?.metadata[0]?.value) return | ||
bot.oxygenLevel = Math.round(packet.metadata[0].value / 15) | ||
bot.emit('breath') | ||
if (!bot.entity) return | ||
if (bot.entity.id !== packet.entityId) return | ||
for (const metadata of packet.metadata) { | ||
if (metadata.key === 1) { | ||
bot.oxygenLevel = Math.round(packet.metadata[1].value / 15) | ||
bot.emit('breath') | ||
} | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.