Open SamNPowers opened 6 years ago
Maybe you can try something like this:
<DiscreteMovementCommands> <ModifierList type="deny-list"> <command>attack</command> </ModifierList> </DiscreteMovementCommands> <ContinuousMovementCommands> <ModifierList type="allow-list"> <command>attack</command> </ModifierList> </ContinuousMovementCommands>
That enables all but the attack command for the discrete command handler and disables all but the attack command for the continuous command handler.
To start attacking, send "attack 1"; to stop, send "attack 0" - it acts like pressing and releasing the attack key, and all the Minecraft attack logic will come into play - so you can hurt pigs, and you won't be able to remove bedrock blocks.
Somewhat surprisingly, that seems to have broken turning. My agents now appear like they start to turn, but they're only ever facing South.
If I keep the deny-list in place for discrete movements, but remove the ContinuousMovementCommands section entirely, this stops happening, and my agents begin to actually turn again.
The commands I'm issuing are "turn 1" and "turn -1".
It would be very convenient if there were some block type that the attack action in the Discrete Movement set was unable to break, for the purposes of setting up permanent maze boundaries and the like. Or perhaps there is a way to configure this, that I was unable to find?
In particular, I was somewhat surprised to find I could break bedrock.
I was able to work around it by using a line of sight check, but it just seems like maybe there should be a cleaner way?