diff --git a/lib/plugins/place_block.js b/lib/plugins/place_block.js index fdaec6b55..d4c5a1678 100644 --- a/lib/plugins/place_block.js +++ b/lib/plugins/place_block.js @@ -8,6 +8,14 @@ function inject (bot) { let oldBlock = bot.blockAt(dest) await bot._genericPlace(referenceBlock, faceVector, options) + // optimistic update + const heldItem = bot.heldItem + const mcData = require('minecraft-data')(bot.version) + const defaultState = mcData.blocksByName[heldItem?.name]?.defaultState + if (defaultState) { + bot.world.setBlockStateId(dest, defaultState) + } + let newBlock = bot.blockAt(dest) if (oldBlock.type === newBlock.type) { [oldBlock, newBlock] = await onceWithCleanup(bot, `blockUpdate:${dest}`, {