Jump to content

Recommended Posts

Posted

I want to create a mod that will right click certain hotbar slots when a certain key is pressed, I want the player to be able to control which slots are going to be pressed with a in game gui, And maybe even how fast they will be pressed (It will be multiple slots pressed: Example slot 1,2,3,4,5,6 will all be scrolled through and right clicked) 

 

Any idea on where to start, Any examples? I've made multiple spigot plugins but no forge mods so im pretty new to this, Would this be fairly simple? Thanks for any help.

Posted

Anything? not asking to be spoonfed, Just want to know how to forcefully switch a players hotbar slot and how to forcefully make a player right click.

I can most likely find out keybindings myself but i can't find how to do the 2 i mentioned above. Any help would be great.

Posted
11 hours ago, diesieben07 said:

Look at what the client does when a slot is clicked, you should start at ContainerScreen, which is the client portion of a GUI with slots in it.

Can i get a link i've searched "ContainerScreen forge" no docs or anything comes up. Is it simple for me to do what i want? I've been stalled in this project for a while now. I learn alot easier by example. Forge to me looks alot more "java" unlike coding spigot plugins where i can generally understand the code and what things mean. Ive look at alot of tutorials and none of them even mention things like these, and there isn't many tutorials on this either. I just need some general direction.

Posted
13 minutes ago, poopoodice said:

I think he what he mean is look into the code itself, how vanilla do such stuff

No idea where to find these things though or where to start as im new to modding and java stuff in general. Would you be able to show me the links and stuff for this? Or better yet show a example of how to do it? I cannot find any other mods that do these things, I want to know how to force a player to right click and how to swap their hotbar slots, Basically all i need to know and im sure i can figure out keybinding myself. Is this even possible to do with mods? <-- I want to know this before i spend more time on this then i already have. I would think their would be more examples on something like this online since i thought it would be fairly simple, but im not sure if thats the case anymore. Anyways any help is appreciated

Posted (edited)
25 minutes ago, diesieben07 said:

Follow the getting started guide of the documentation to find out how to set up your modding environment.

Beyond that, Java knowledge is required to make a Forge mod.

I know how to do all of that, I’m asking about the methods the lines of code to be able to forcesfully switch a players hot bar and forcefully make them right click.

Edited by LegoBlocks_6
Posted
1 hour ago, diesieben07 said:

Like I said, look at ContainerScreen and what it does when you click the mouse. You need to replicate that.

Where do I find these things?

Posted
25 minutes ago, diesieben07 said:

Which things...? do you not know how to use your IDE?

What do you mean? Is it not a document page? “Look at containerscreen and what it does when you click the mouse” how is that going to be on my IDE? I was asking what the link to look at container screen is, also, I need to know how to forcefully switch hotbar slots also not just clicking

Posted
19 minutes ago, diesieben07 said:

ContainerScreen is a vanilla Minecraft class. Minecraft is decompiled code, not everything is well documentated.

So is there any link you can provide me to find these decompiled codes? Also can you please answer if what i want to do is even possible with a mod? I can do this very easily with AHK Instead but i want it to be In-game so its more player friendly and easier to access. 

Posted
Just now, diesieben07 said:

How did you set up your workspace and which version of Minecraft are you using?

Using 1.12 and with the intellij minecraft development plugin theres a forge option https://gyazo.com/ea30ce6c49aa3f1fefbc3cb94fb0d65e, Atleast with spigot plugins it gets rid of having to set everything up and wasting all that time. It has all of these things https://gyazo.com/3205299aab650edfd7b1d53dd51a7796

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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