Skip to main content

Comments

4 comments

  • Andrew Mulholland

    Michael Reilly the execute detect command is used for running a further command if a block at a certain location is a particular block. It is possible I guess to use it to detect a different state of a door (it supports data values, like if a door is open/closed), but this would also apply if a player walked through.

    It's a complex puzzle and no real way to detect if a mob has opened a door (vs a player). You can detect if a mob is at a particular set of coordinates, followed by if a door is open, but it's getting complex at that point (especially given you then have to handle shutting the door after to avoid the same thing refiring, all without being able to guarantee it was the mob that opened the door)

    0
  • Michael Reilly

    Thanks for the comment. I don't need an actual door, testing coordinates is a great suggestion for passing through an opening.

    0
  • Michael Reilly

    I should be more clear (I tend not to be sometimes).  Imagine a closed room of 100 chickens.  I break some blocks to create an opening.  As chickens pass through the coordinates of that door (we can compare to the X value), we add something to an inventory, like a GOLD block, or anything else.  Do you have a suggestion for the Python to make this comparison for any mob entity (does not have to be a chicken) that exceeds this coordinate, pretty much counting how many mobs have passed?  I'm decent at coding, but very new to Minecraft methods.  Thanks!

    0
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    We couldn't use a pressure plate for this, because multiple chickens, or what-have you could pass through at the same time...

    Thinking... What if we teleported them into a "counted" room?

    0

Please sign in to leave a comment.