-
Bug
-
Resolution: Awaiting Response
-
None
-
1.20.0
-
Unconfirmed
-
Multiple
Issue: when world.afterEvents.blockBreak is fired, the affected block is always minecraft:air
Example:
import * as Minecraft from "@minecraft/server";
Minecraft.world.afterEvents.blockBreak.subscribe( (broken) => {
let blockID=broken.brokenBlockPermutation.type.id;
let xpos=broken.block.x;
let ypos=broken.block.y;
let zpos=broken.block.z;
Minecraft.world.sendMessage(`Block break detected : ${blockID} at ${xpos},${ypos},${zpos}`);
}
)
1.) register this script as behaviour - pack
2.) Place a block somewhere in the world (for example dirt, cobble-stone etc...)
3.) destroy this block
4.) the afterEvent from the script fires, but does NOT show the correct blockID
observed: script always returns "minecraft:air" as destroyed block
expected: script should return the destroyed block
Script-API Version: 1.3.0-beta
EDIT: after shutting down Windows and started all over, the script behaved as expected.
Although, the issue was there, but the trigger is unknown for the moment...
Edit 2: it seems to happen mainly on Bedrock-Server, but also appeared locally