Skip to main content

How do I reference an agent with command block?

Comments

7 comments

  • Dominick Support
    Bug Zapper Support

    Can you clarify what the @e is designated for? That is for a user/username, correct? 

    0
  • Dani Noble
    Moderator Beacon of Knowledge Super Star

    Dominick, the @e is designated for entities. 

    When typing /commands, the commands work, however with some testing, it appears command blocks don't support working with the agent. 

    I tested using /testfor @e [r=10,type=agent] by command, at it located the agent, but when entered into a repeating command block, it didn't. Also tried /testfor @c with the same results. 

    1
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Neri Bar-On - Hi! When you say you do not want the agent to be active, does that mean you want there to be no option for coding, or do you mean you want the agent to disappear? (Sweet fellow, but he can get in the way!) =]

    1
  • Neri Bar-On

    Debbie,
    I way we use minecraft is by creating a fullclass world where the kids work the whole year. We keep them playing while adding elements as currancy and minigames and activities to chalange them in the learning field but we keep all things open so kids who wish can learn coding the agent.

    The agen is very powerful but it can dig bedrock blocks as command bloks even when you have deny. My guess it is a bug but it is what we have.

    So i need to make sure the agents cannot work in certain areas.

    The solution i found is creating function that run from a command block that disable agents from harming areas that we have other kids or us developed.

    0
  • Neri Bar-On

    Thank you Dan to confirm that something does not work well.

    I Solved my problem with using function.

    Thank you.

    Is there a way to report bad design as the abilities of the agent to break blocks over deny blocks and that commands does not work as expected?

    0
  • Danny Support
    Beacon of Knowledge Bug Zapper Support

    Hey Neri,

    Are you saying you experienced the Agent breaking a block using regular code, on top of a Deny block? Did you experience it breaking the Deny block itself as well?

    Let us know the exact code you used if this is the case and I can forward it to our test team to dig deeper.

    Thanks!

    1
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Ahhh, the ability to set World Builder in Python AZNB was a welcome addition to a recent update. However, it seems that in regards to deny blocks, word builder status is no blockade to the coding window! I used that same code I used in the recent "roof" code as I was preparing to test the Agent. You can see the setup here. The agent was to approach a command block. The Copper blocks and the command block all have deny blocks beneath them, and World builder status is OFF. But when I ran the roof code, looking to add new code to have the Agent move forward and explore the ability to manipulate the command blocks, my code just wrote right over the blocks. Evidently deny blocks can't stand in the way.

    1

Please sign in to leave a comment.