-2

I'm trying to use commands to make something similar to the "pop-up tower" chest on Hypixel bed wars.

I am trying to testfor and execute at any chest with a specific pattern of certain items, or at least one with a specific name, and also at unspecific coordinates.

As of now, I can testfor a chest with specific items, but only relative to the player. And also, any item can be in the other unspecified slots, so when I test, how do I check for no item in a slot?

And what command would I use to execute at this chest?

I'm on 1.12 by the way. So 1.13+ commands won't work.

Edit, the answer didnt help and they wont let me delete the question.

2
  • What have you tried, what are your problems with what you tried, what exact part of this do you have a problem with? Commented May 26, 2020 at 8:31
  • 5
    Hi @Aceplante, telling people to stop downvoting isn't going to stop them from downvoting you - the best you can do is make your question the best it is. Also - Does ExpertCoder14's answer work for you? Looks to me like the /testforblocks command should work in 1.12.
    – Robotnik
    Commented Jun 11, 2020 at 0:32

1 Answer 1

3

You should use /testforblocks. This tests if two chests are the same.

/testforblocks templateX templateY templateZ templateX templateY templateZ testforX testforY testforZ

You will need to place a template chest down with the specific item pattern.

Then if it passes, you use a conditional command block placed after that to continue the chain.

If you need to use non-relative coordinates, remove the tilde ~ from your coordinates. So instead of typing ~1 ~2 ~3, type 1 2 3 to always execute at world coordinates (1, 2, 3), instead of relative.

Otherwise, I don't quite understand what you mean by "unspecific coordinates". I assume it means that it is not relative, but a certain world coordinates each time. If not, please update it in your question to be more specific.

If you want to test for any chest, anywhere, it's going to be quite tricky, and I'm not skilled enough to solve it. Sorry.

1
  • As mentioned in the last paragraph it’s impossible to do that. Commented Oct 24, 2021 at 6:03

You must log in to answer this question.

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