@ratismal I want to make a mod that add a "macro" that do some things. One of this is breack a block with the selected item
in your code the player "press" the left mouse button while the command "KeyBinding.setKeyBindState(bind.getKeyCode(), false);" is used?
@ratismal
the b option. I want to press a button (I alredy use a KeyHandler to call this method) and the player dig the block until it breacks.
@Failander
I work ONLY on client side.
Hi guys,
I want to create a method to press a key and break a block (of stone or other) in front of me with my pickaxe.
I write this method but it do nothing and minecraft crash.
public static void rompi(){
int max = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem().getMaxDamage();
int curDam = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem().getItemDamage();
int nextDam=Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem().getItemDamage();
while(curDam==nextDam){
Minecraft.getMinecraft().thePlayer.swingItem();
nextDam=Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem().getItemDamage();
}
}
swingItem() make a swing of my item, but in this while isn't true...
help
Hi, i want to activate a press event (like left or right mouse click) using a command in my mod.
example "code"
public void exampleFunction{
if(condition){
leftMouseClick();
}else if(condition2){
pressH();
}else{
rightMouseClick();
}
}
I have a good java experience, but a very little experience for making mod (i'v only make a tutorial mod).
Anyone can help me?
I see that class but how I read the Entity entityIn and the World worldIn in the keybind event?
In the method "onEntityCollidedWithBlock" the params is automatic because is an override (I think...)
Hi, i want to move the player visual without move the mouse, using only some key from keyboard (for example "H" for turn n degrees left, "K" for right, "U" for up and "J" for down).
I have a good java experience, but a very little experience for making mod (i'v only make a tutorial mod).
Anyone can help me?