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 guys,how to add a mana setting to the player character?

 

Like thisCQdsZSy.jpg

Each casting spell will consume a certain amount of mana,and mana will slowly recover over time.

 

I have done the part of casting spells within onitemrightclick(),but where should i edit the mana setting?Should i put it in Entityplayer?

 

What should i do next?Is there any function to do that with Entityplayer?

 

 

---

I'm sorry I forgot

1.7.10 - 10.13.4.1558 Recommended

1.8.9+: http://mcforge.readthedocs.org/en/latest/datastorage/capabilities/

-1.8.9: http://mcforge.readthedocs.org/en/latest/datastorage/extendedentityproperties/

 

Make object, attach it, store mana, edit it when needed.

 

Regeneration can be done with PlayerTickEvent (pick event.phase).

 

You will NEED packets: http://www.minecraftforge.net/forum/index.php/topic,20135.0.html

 

Rendering can be done with RenderGameOverlayEvent (pick sub event, most likely Post and event.type).

1.7.10 is no longer supported by forge, you are on your own.

Something to make note of if you run in to render issues.

 

I had to remove my getType check for my bar to render properly. I tried with every ElementType and every single one of them made my bar render with the wrong colors.

 

So start out using it but if you have issues keep in mind that you may have a similar problem.

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

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.