Jump to content

[1.8] Hotkey effect difficulty question


pandaninjarawr

Recommended Posts

I'm currently using this tutorial to make a keybind:

http://www.minecraftforge.net/wiki/Key_Binding

 

I was able to do what the tutorial told me to do and the hotkey works, but I have a question on how practical/difficult of what I want it to do is:

 

Once I press the key (e.g. H), the player will have all their items stored somewhere and their inventory hotbar is replaced by a "skill" hotbar, and the mouse can scroll through it. Also, the hunger bar is replaced by a "power" bar.

 

Is this going to be really hard work? Are there any tutorials I should look up to prep myself for something like this? Also, are 1.7 tutorials OK for forge 1.8?

 

Thanks everyone!

Link to comment
Share on other sites

1. Why would you REPLACE everything? You can render more stuff using RenderGameOverlayEvent

http://www.minecraftforge.net/wiki/Gui_Overlay

 

2. To store additional data for players you need IEEP:

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/1571567-1-7-2-1-6-4-eventhandler-and

2nd post.

 

3. To store copy of inv, you will need to use IEEP and copy ItemStack[] of player.inventory to custom field in your IEEP (also use write/read NBT)

 

4. Any data (your "power") requres packets in order to be shared between server and client:

http://www.minecraftforum.net/forums/mapping-and-modding/mapping-and-modding-tutorials/2137055-1-7-2-customizing-packet-handling-with

 

5. This is going to be REALLY time-consuming if you never done it before. Also - don't do it if you doubt your skills in Java, this actually requires more than total basics (if you want to code it well and understand).

 

 

Side-notes:

- KeyBindings are client-side only, to notife server about pressing you also need to send packet.

- Yes, most of 1.7.10 works for 1.8.

 

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

Link to comment
Share on other sites

What Ernio said pretty much covers it, but keep in mind that you don't really need to store the player's inventory anywhere separate - what displays on the screen is not dependent what is or isn't stored somewhere.

 

You can simply NOT draw the inventory hot bar without changing anything in about the inventory itself, and then draw your custom hot bar in its place.

 

That said, you should definitely start simple and build up to it one step at a time.

Link to comment
Share on other sites

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.