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.

[1.7.10][Solved]I want to include an XP storing block or chest in my mod.

Featured Replies

Posted

I found some online, but the only one's I've seen are for forge versions under 1.7 (I did find this one for 1.7.2: XP Storage Chest, but when I used it, it glitched and said it had a large negative number of experience). If anyone knows a mod like that for 1.7 can you post a link. If not, I saw these two tutorials: Containers and GUI and Basic GUI. I don't want to make a GUI open when pressing a key, but I'm not making a block that stores items, only experience, which tutorial do I follow or do I follow the gui container tutorial, but use "extends GuiScreen" instead, or do some other approach.

  • Author

What exactly do you mean "stores XP"?  Do you want to be able to put XP orbs in and take it them out somehow?  Or do you mean you just want it to display the player's current XP?

A block that you store experience (the experience you use for enchanting), not the orbs entities itself, but the number. So you can place an amount in it, and take it out later.
  • Author

Experience is just a number.

If you want to store more, increase it, if you want to deduct, decrease it.

You'll need a TileEntity to store that number.

Yeah, but I need the TileEntity to open a menu for it when I right click on it.
  • Author

And? There's plenty of Gui tutorials.

Yeah, but which one those tutorials should I follow or is there a better tutorial for what I need, a block entity that opens a menu, but doesn't store items. Most GUI tutorials I find or for chest or furnaces.

You can make a simple system:

left click the block for taking xp.

right click the block for storing xp,

 

this is very easy.

  • Author
You can make a simple system:

left click the block for taking xp.

right click the block for storing xp,

 

this is very easy.

I thought about making it so you click for storing and taking xp, if I do that I want the xp to be displayed on the entity though, I found a link on how to display names, so I'll give it a try. Thanks.

Just leave out the inventory part. Pretty much all you need is a GuiHandler and a GuiScreen.

If non GUI idea doesn't work out then I'll use GuiHandler and GuiScreen and leave out the inventory then. Thanks.

Well of course you could try using NBT, and if that doesn't work you could look at the code for OpenBlocks on GitHub. It includes the "Vacuum Hopper" that stores xp and the "Tank" also does. Hope this helps. :)

 

Edit: Forgot the link, sorry: https://github.com/OpenMods/OpenBlocks

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.