I want to know how to do this in Minecraft Bedrock Edition. For example: A player placed a chest near piston, is there any way to remove the chest itself near the piston?

  • In MCJava you would do raytracing to get the position of the chest and then check blocks nearby with /execute if block or whatever and then simply use /setblock or /fill to remove the chest. I have no idea which parts of that would work in MCBE, which would be different and which just impossible, but maybe you can do something similar. Sep 6, 2020 at 14:04

2 Answers 2

/fill x1 y1 z1 x2 y2 z2 air 0 replace chest

Replace the x1-z2 arguments with actual coordinates that describe the diagonal of the volume you're checking.


The only way I know how to do this is with either commands, or a headless piston. You can use TNT too, but that would destroy the piston, and you probably don’t want that.

  • Hello, and welcome to Stack Exchange. We appreciate your answer, but could you explain what a headless piston is?
    – Penguin
    Nov 30, 2020 at 15:58
  • perhaps a piston without the wooden part? wait, that's illegal Mar 30, 2021 at 14:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .