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

I am wondering how i can make vanilla Minecraft mobs follow me when i hold my item. can i make this happen in my custom item's class? If so, how can i accomplish this? I am new to modding so if you could show me some sort of example code that would be wonderful, also, i would like to thank you for your help in advance.

There's a task called EntityAITempt, which handles animals following you when you hold wheat/seeds/whatever. So I believe you would actually have to add the tasks to the entities you want to respond to your item. The item is one of the arguments for the constructor of the task, actually, so you shouldn't have any problem.

 

To add the task to the vanilla animals though, you'd need to make an event handler to get the animal when it joins the world and check if it's the right species, and then add it to each animal as it is created.

 

I used this tutorial by coolAlias to make such a handler and did so without a hitch. Hope that helps!

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.