CheatUtils by Zergatul

CheatUtils by Zergatul

32.5k Downloads

Cannot fill glass bottle using block automation.

PotsThePotato opened this issue ยท 1 comments

commented
int WaterX = 1828;
int WaterY = -60;
int WaterZ = 497;

if (currentBlock.getX()==WaterX && currentBlock.getY()==WaterY && currentBlock.getZ()==WaterZ )
{
    blockAutomation.useItem("glass_bottle","from-top");
}

Glass bottle is selected in hand but it doesn't interact with the water block.
Tried putting "minecraft:" before the ID, also tried without "from-top".
Am I missing something?

commented

Your code is ok. The problem is few items in Minecraft send another packets when you use them. And you are required to look at the block. Buckets/bottles are examples of such items.

You can verify if item can be used from block automation like this: don't look at target block, enter freecam, use item. If item use is not successful - it will not work from block automation.

As replacement you can use player.lookAt(...), keys.use.click()