Jump to content

Setting mutex flags - 1.16.3


Turtledove

Recommended Posts

So I've got an AI class where previously in 1.12.2, the mutex bits were set to 7 (incompatible with other vanilla AIs). I'm attempting to update this to 1.16.3, but I see that the mutex bits are replaced by an enumset of flags, which are: MOVE, JUMP, LOOK, and TARGET.

 

If I want equivalent behavior where the AI shouldn't execute when vanilla AIs are executing, how do I set the flags?

Link to comment
Share on other sites

Howdy

It looks to me like the enums have just taken place of the bits.  An EnumSet actually is functionally equivalent to the way the mutex were used before.

eg if previously MOVE was bit 0 (=1), JUMP was bit 1(=2), LOOK was bit 2(=4), and TARGET was bit 3(=8)

then a mutex of 7 = 1  + 2 + 4  = MOVE + JUMP + LOOK

is the same as an enumset of {MOVE, JUMP, LOOK}

 

You just need to find the 1.12.2 mutex bits which correspond to the new flags.

Goal.setMutexFlags() appears to be the method you need.

 

-TGG

 

 

 

 

 

 

 

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.