Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

hjk321

Members
  • Joined

  • Last visited

  1. hjk321 changed their profile photo
  2. Hello, I am currently overhauling some vanilla mobs to have a third state between sitting and following. I am accomplishing this by reading a simple boolean NBT tag and altering the mob's AI on EntityJoinWorld. I just have a few general questions that would really help me out if someone could take the time to clear some things up for me. This is how these DataParameters are defined for reference, by the way. public static final DataParameter<Boolean> WOLF_INDY = EntityDataManager.createKey(EntityWolf.class, DataSerializers.BOOLEAN); public static final DataParameter<Boolean> OCELOT_INDY = EntityDataManager.createKey(EntityOcelot.class, DataSerializers.BOOLEAN); public static final DataParameter<Boolean> PARROT_INDY = EntityDataManager.createKey(EntityParrot.class, DataSerializers.BOOLEAN); 1. Is it a good idea to have a mod add DataParameters to vanilla mobs? I could see that perhaps this would create incompatibilities somewhere. 2. How would these new DataParameters be handled by existing worlds? Would it default to false or throw errors? 3. Am I missing something obvious about handling custom mob NBT? This whole DataManager thing seems kinda convoluted for a simple key:value system. I could understand the value of enum-style tag definitions if you were, say, making your own mob, but I'm modding the AI of vanilla mobs on the fly, and the boolean I'm defining will only apply to certain instances of said mob anyway. Why can't I just define a custom tag via a string like you can using an in-game command? like literally all I want to do is add {Indy:true} to certain mobs and then read that later. Thank you for your advice.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.