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.

Featured Replies

Posted

Hello everyone! New to the modding community and the forums, but I'll go ahead and get right to it:

I'm trying to make a mod that allows me to spawn a horse with specific variants set (i.e. the coat color and coat type).

I've been combing through the horse code for a while, and it seems like anything that would allow be to do this has been blocked off. The main function I'd want to use, setVariantAndMarkings() in the HorseEntity class, is private. I've tried replicating what the function itself does, but it relies on more private information (it has to set the entitydata using a unique id defined privately at the top of the class: DATA_ID_TYPE_VARIANT).

Does anyone know of any way I could get around these roadblocks? I've been trying out various approaches for hours now to no avail. If any more info is needed feel free to ask and I'll happily provide some.

Any help would be greatly appreciated! Thanks!

  • Author

Found a solution! To anyone who may wonder in the future, I ended up using the readAdditionalSaveData function of the HorseEntity class, and passed in a compoundNBT tag with the Variant value already calculated.

In the future if anyone has any other questions on this topic, go ahead and post them here!

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...

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.