Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Setting mutex flags - 1.16.3
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
Turtledove

Setting mutex flags - 1.16.3

By Turtledove, December 2, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Turtledove    4

Turtledove

Turtledove    4

  • Creeper Killer
  • Turtledove
  • Members
  • 4
  • 133 posts
Posted December 2, 2020

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?

  • Quote

Share this post


Link to post
Share on other sites

TheGreyGhost    819

TheGreyGhost

TheGreyGhost    819

  • Reality Controller
  • TheGreyGhost
  • Members
  • 819
  • 3280 posts
Posted December 4, 2020

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
  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Gubipe
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By Gubipe · Posted 24 minutes ago

      I am making the two mods with the same functionality. One is 1.16.4 and the other is 1.8.9. The current one is 1.8.9 and then I shall try to port it over to 1.16.4
    • poopoodice
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By poopoodice · Posted 41 minutes ago

      It's for animation only. Btw what version are you using?
    • TheDonkey_King
      I just started modding minecraft and I thought i had finished modding it but Titanium mod isn't loading properly. Can someone help me fix this?

      By TheDonkey_King · Posted 59 minutes ago

      What file?
    • BIGDog8808
      HELP! WORLD WONT WORK

      By BIGDog8808 · Posted 1 hour ago

      so is there anyway that i can copy the world and use it with forge  
    • mightymoy
      Cant craft items in modded server

      By mightymoy · Posted 1 hour ago

      we arent using Opti fine anymore and no specific reason we had just picked 1.16.1 
  • Topics

    • Gubipe
      2
      Minecraft.getMinecraft().thePlayer.swingItem(); wont attack

      By Gubipe
      Started 2 hours ago

    • TheDonkey_King
      4
      I just started modding minecraft and I thought i had finished modding it but Titanium mod isn't loading properly. Can someone help me fix this?

      By TheDonkey_King
      Started 6 hours ago

    • BIGDog8808
      10
      HELP! WORLD WONT WORK

      By BIGDog8808
      Started 7 hours ago

    • mightymoy
      8
      Cant craft items in modded server

      By mightymoy
      Started Yesterday at 03:00 AM

    • tinyborisYT
      2
      [1.12.2] Crash at Launch, No clue why

      By tinyborisYT
      Started 2 hours ago

  • Who's Online (See full list)

    • RafaMv
    • CaelTheQuail
    • LK1905
    • Eridani
    • Gubipe
    • DaemonUmbra
    • Caffeinated Pinkie
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Setting mutex flags - 1.16.3
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community