mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-08-15 03:35:34 +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
|
@ -106,6 +106,14 @@ export const queryList = [
|
||||||
if (blocks.length == 0) {
|
if (blocks.length == 0) {
|
||||||
res += ': none';
|
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);
|
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.
|
* @param {number} distance - The maximum distance to search, default 32.
|
||||||
* @returns {Block} - The lowest block.
|
* @returns {Block} - The lowest block.
|
||||||
* @example
|
* @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
|
// if blocktypes is not a list, make it a list
|
||||||
let search_blocks = [];
|
let search_blocks = [];
|
||||||
|
|
|
@ -18,7 +18,7 @@ const Item = prismarine_items(mc_version);
|
||||||
* @typedef {string} BlockName
|
* @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 = [
|
export const MATCHING_WOOD_BLOCKS = [
|
||||||
'log',
|
'log',
|
||||||
'planks',
|
'planks',
|
||||||
|
@ -202,7 +202,7 @@ export function isSmeltable(itemName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSmeltingFuel(bot) {
|
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)
|
if (fuel)
|
||||||
return fuel;
|
return fuel;
|
||||||
fuel = bot.inventory.items().find(i => i.name.includes('log') || i.name.includes('planks'))
|
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) {
|
export function getFuelSmeltOutput(fuelName) {
|
||||||
if (fuelName === 'coal' || fuelName === 'charcoal')
|
if (fuelName === 'coal' || fuelName === 'charcoal')
|
||||||
return 8;
|
return 8;
|
||||||
|
if (fuelName === 'blaze_rod')
|
||||||
|
return 12;
|
||||||
if (fuelName.includes('log') || fuelName.includes('planks'))
|
if (fuelName.includes('log') || fuelName.includes('planks'))
|
||||||
return 1.5
|
return 1.5
|
||||||
if (fuelName === 'coal_block')
|
if (fuelName === 'coal_block')
|
||||||
|
|
Loading…
Add table
Reference in a new issue