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 want to create an integer variable and have it be read and written to NBT but to the EntityPlayer NBT so it saves for everytime you close and reopen minecraft but is also different for each world, and the NBT of EntityPlayer does that. However I want to do this without editing the class EntityPlayer or any base classes for that matter. Is this possible? If so how?

 

A further point is I'd like to do it from my base class or my proxy file. This would be great but if it can only be done from creating a separate class than I don't mind. Thanks in advance.

This is very possible. If you have lots of data that you want to store, than you can make a class that implements IExtendedEntityProperties ( or something similar to that name ). Or you can use

NBTTagCompound playerNBT = playerInstance.somethingToGetNBT();

playerNBT.setInteger( "MyIntegerForSomethingToBeStored", myIntegerToBeStored );

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

  • Author

Thank you. I will look into these tomorrow and get back to you as to if they worked (they probably do anyway)

Thank you. I will look into these tomorrow and get back to you as to if they worked (they probably do anyway)

 

There are a few extra things with the interfacing way, with the NBTTagCompound straight from the player... I haven't really done that.

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

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.