Jump to content

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


Recommended Posts

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.

Posted

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.
Posted

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.
Posted

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.
Posted
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.

Posted

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.