mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-03 23:25:20 +02:00
Added wood types for cherry and mangrove
Added descriptors for !nearbyBlocks
This commit is contained in:
parent
6a7820ba76
commit
67eb491568
3 changed files with 13 additions and 3 deletions
|
@ -105,6 +105,14 @@ export const queryList = [
|
|||
}
|
||||
if (blocks.length == 0) {
|
||||
res += ': none';
|
||||
}
|
||||
else {
|
||||
// Environmental Awareness
|
||||
res += `\nBLOCK_ABOVE: ${world.getBlockAtPosition(bot, 0, 2, 0).name}`;
|
||||
res += `\nBLOCK_BELOW: ${world.getBlockAtPosition(bot, 0, -1, 0).name}`;
|
||||
res += `\nBLOCK_AT_HEAD: ${world.getBlockAtPosition(bot, 0, 1, 0).name}`;
|
||||
res += `\nBLOCK_AT_LEGS: ${world.getBlockAtPosition(bot, 0, 0, 0).name}`;
|
||||
res += `\nLOWEST_BLOCK_ABOVE: ${world.getLowestBlock(bot, null, null, 32).name}`;
|
||||
}
|
||||
return pad(res);
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ export function getLowestBlock(bot, block_types=null, ignore_types=null, distanc
|
|||
* @param {number} distance - The maximum distance to search, default 32.
|
||||
* @returns {Block} - The lowest block.
|
||||
* @example
|
||||
* let lowestBlock = world.getLowestBlock(bot, 0, -1, 0);
|
||||
* let lowestBlock = world.getLowestBlock(bot, null, null, 32);
|
||||
**/
|
||||
// if blocktypes is not a list, make it a list
|
||||
let search_blocks = [];
|
||||
|
|
|
@ -18,7 +18,7 @@ const Item = prismarine_items(mc_version);
|
|||
* @typedef {string} BlockName
|
||||
*/
|
||||
|
||||
export const WOOD_TYPES = ['oak', 'spruce', 'birch', 'jungle', 'acacia', 'dark_oak'];
|
||||
export const WOOD_TYPES = ['oak', 'spruce', 'birch', 'jungle', 'acacia', 'dark_oak', 'mangrove', 'cherry'];
|
||||
export const MATCHING_WOOD_BLOCKS = [
|
||||
'log',
|
||||
'planks',
|
||||
|
@ -202,7 +202,7 @@ export function isSmeltable(itemName) {
|
|||
}
|
||||
|
||||
export function getSmeltingFuel(bot) {
|
||||
let fuel = bot.inventory.items().find(i => i.name === 'coal' || i.name === 'charcoal')
|
||||
let fuel = bot.inventory.items().find(i => i.name === 'coal' || i.name === 'charcoal' || i.name === 'blaze_rod')
|
||||
if (fuel)
|
||||
return fuel;
|
||||
fuel = bot.inventory.items().find(i => i.name.includes('log') || i.name.includes('planks'))
|
||||
|
@ -214,6 +214,8 @@ export function getSmeltingFuel(bot) {
|
|||
export function getFuelSmeltOutput(fuelName) {
|
||||
if (fuelName === 'coal' || fuelName === 'charcoal')
|
||||
return 8;
|
||||
if (fuelName === 'blaze_rod')
|
||||
return 12;
|
||||
if (fuelName.includes('log') || fuelName.includes('planks'))
|
||||
return 1.5
|
||||
if (fuelName === 'coal_block')
|
||||
|
|
Loading…
Add table
Reference in a new issue