Hello! I could not find a "Help Making Clients" tab so I chose the most related one.
Ok, so I need help creating a Minecraft 1.11.2 Client that, when you press "P" it toggles a loop that presses the "Use Item" button once every 30 secons until toggled off. I've tried doing this by myself but all the tutorials require Basic Java Knowledge of which I have none.
I fully understand this is being lazy, but I HAVE put in hours of effort to no avail so, if someone could provide me with a Minecraft 1.11.2 Client that does this, it would be greatly appreciated. Thankyou!
My suggestion would be to create a keybinding which toggles a boolean variable on/off. Subscribe to a client update tick (should be a subclass of TickEvent), check if the player is currently in a world. If so, use a countdown variable (keep in mind there are 20 ticks/second).
Really, one day you'll have bigger ideas for mods. You should learn Java. There are some good introductions here about concepts you'll need to know.
I understand the logic behind what I want to do, but I have no idea where to put this inside the code, also I have no way to edit the java code of Minecraft itself. If you could write out the section of code for the boolean true or false variable that (if true) activates the countdown variable (for one minute, not 30 seconds), then tell me exactly where to put it in the client and how to veiw the code of the default client.. Am I making any sense? What I mean is, could you provide me with the required code for what I wanted, then tell me where to put it and how to edit the code that would be greatly appreciated. I know this sounds super lazy but believe me, MCP and Eclipse and whatever else is required will not work for me. Also keep in mind, I want a client, not a mod. Thanks!
Also, if possible instead of that make it press the "Use Item" button every Minute, make it so it presses the "use item" button if there is a block 15 blocks underneath the respective player. Thankyou. (this is meant to be used with the elytra)
First of all please note that making a custom client would probably break mods and/or Forge. Also I don't have much experience with this kind of stuff so beware.
The standard approach to modding is to use the deobfuscated version of Minecraft, but since you are using MCP, your code setup is probably going to be obfuscated. This means regular names like EntityPig or ticksExisted will be replaced by weird names like axy or field_0042fm_d. You will need to look up the mappings for the names to find out the correct obfuscated names.
I would recommend finding and editing an onUpdate method in the Minecraft class.
Honestly, it's much easier to just setup Minecraft Forge and eclipse, and export as a mod.
Basic idea of code. It's going to be a lot different if you are editing base classes but here's the gist of it. You really should learn Java:
int ticks = 0;
boolean disabled = false;
// whatever update() method you have. Either an event handler (with Forge) or editing Minecraft.java
// note> the method may not be named exactly update, and may have some parameters
public void update() {
if (minecraftIsIngame() && !disabled) {//ingame and not disabled
ticks++; // add 1 to ticks
if (ticks % (60*20) == 0) {//if ticks is a multiple of (60*20) -> 60 seconds has passed
ticks = 0; // reset ticks back to 0
// The Robot class allows you to send user input to the java program without the user actually doing it... evil!
// Please note that the below method probably does not exist, you need to read the docs yourself
new java.awt.Robot().sendMousePress(RIGHT_CLICK);
}
}
}
// Probably won't be exactly called onKeyPress nor with no parameters...
public void onKeyPress() {
if (myKey.isDown()) {
disabled = !disabled;// toggle disabled
}
}
Hello! I could not find a "Help Making Clients" tab so I chose the most related one.
Ok, so I need help creating a Minecraft 1.11.2 Client that, when you press "P" it toggles a loop that presses the "Use Item" button once every 30 secons until toggled off. I've tried doing this by myself but all the tutorials require Basic Java Knowledge of which I have none.
I fully understand this is being lazy, but I HAVE put in hours of effort to no avail so, if someone could provide me with a Minecraft 1.11.2 Client that does this, it would be greatly appreciated. Thankyou!
~R2bEEaton
My suggestion would be to create a keybinding which toggles a boolean variable on/off. Subscribe to a client update tick (should be a subclass of TickEvent), check if the player is currently in a world. If so, use a countdown variable (keep in mind there are 20 ticks/second).
Really, one day you'll have bigger ideas for mods. You should learn Java. There are some good introductions here about concepts you'll need to know.
~ Crows
Avatar Mod 2 -- Elemental Bending from Avatar: The Last Airbender
Contact: PM or [email protected]
I understand the logic behind what I want to do, but I have no idea where to put this inside the code, also I have no way to edit the java code of Minecraft itself. If you could write out the section of code for the boolean true or false variable that (if true) activates the countdown variable (for one minute, not 30 seconds), then tell me exactly where to put it in the client and how to veiw the code of the default client.. Am I making any sense? What I mean is, could you provide me with the required code for what I wanted, then tell me where to put it and how to edit the code that would be greatly appreciated. I know this sounds super lazy but believe me, MCP and Eclipse and whatever else is required will not work for me. Also keep in mind, I want a client, not a mod. Thanks!
Also, if possible instead of that make it press the "Use Item" button every Minute, make it so it presses the "use item" button if there is a block 15 blocks underneath the respective player. Thankyou. (this is meant to be used with the elytra)
Hmm..
First of all please note that making a custom client would probably break mods and/or Forge. Also I don't have much experience with this kind of stuff so beware.
The standard approach to modding is to use the deobfuscated version of Minecraft, but since you are using MCP, your code setup is probably going to be obfuscated. This means regular names like EntityPig or ticksExisted will be replaced by weird names like axy or field_0042fm_d. You will need to look up the mappings for the names to find out the correct obfuscated names.
I would recommend finding and editing an onUpdate method in the Minecraft class.
Honestly, it's much easier to just setup Minecraft Forge and eclipse, and export as a mod.
Basic idea of code. It's going to be a lot different if you are editing base classes but here's the gist of it. You really should learn Java:
~ Crows
Avatar Mod 2 -- Elemental Bending from Avatar: The Last Airbender
Contact: PM or [email protected]