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!

 

Forgive my freshness in my stream of questions.  I've only just started programming in Java and modding using Forge so I'm a bit green to it all, though have spent the past few days pouring over code, tutorials and the javadocs to get a few simple mods working.

 

My question though is this:

 

I've created a tool that I would like to be used on most mobs in the game, similar to shears though giving a different item in each case.  From what I gather looking over the source, this interaction is handled in mobs class itself.  Would I need to do base edits or is there an event that I can use for this?

 

I've given a good look but can't see a way to it, so a point in the right direction or some confirmation would be greatly appreciated!

Is this what you're looking for? When you're looking for events it helps to look in the sub-packages of net.minecraftforge.event

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

  • Author

I'd spent some time playing with other methods but had little success bar altering damage levels and stack size.  I think that event might be the answer, though my new arrival to Java and Forge leaves me uncertain after a good few hours fiddling with it and trying to implement anything.

 

The problem I'm having is that I can't get the event itself running, more because I don't fully understand its operation even after reading the javadocs, intro to Events on the Minecraft Forums and the code itself.

 

I'm getting there the more I play with code and test various functions ingame, I could just do with a little push on the usage of this particular event.  I'm sure it's something glaringly obvious staring me right in the face...

 

---

 

Edit:

 

I eventually managed to get something working by reworking some of the shearing code, though it was incredibly sloppy and would never be suitable as it was.  My understanding's growing at least, and I can see now how to use the event to my advantage.  Thanks!

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.