💡 How to properly mod minecraft
Hi everyone! I've been playing around with modding Minecraft for the past days and there's always been one thing that was bugging me the the highest point, I'm currently learning java in college and although I can code pretty well, we didn't learn how to work with more then one class yiet.
this is where my issue comes in to play, so far all my coding has been implemented in already existing classes, I know for a fact this is the wrong way to do it, and it has been bugging me ever since, but I don't know how to do it otherwise.
what I would like to be able to do is create classes with each of my hacks that don't modify already existing minecraft functions,
Ex: godmod doesn't need a class, ( We could but it would be very small )
now a class that I would really like to make is one for my aimbot because it shouldn't be sitting in GuiIngame.
so here's what I'm asking, how to properly make classes that interacts with the minecraft code.
here's my aimbot method that i would like to implement:
also, special thx to Drinking Water for his aimbot code!!
this is where my issue comes in to play, so far all my coding has been implemented in already existing classes, I know for a fact this is the wrong way to do it, and it has been bugging me ever since, but I don't know how to do it otherwise.
what I would like to be able to do is create classes with each of my hacks that don't modify already existing minecraft functions,
Ex: godmod doesn't need a class, ( We could but it would be very small )
now a class that I would really like to make is one for my aimbot because it shouldn't be sitting in GuiIngame.
so here's what I'm asking, how to properly make classes that interacts with the minecraft code.
here's my aimbot method that i would like to implement:
Code:
public static void aimbot(){
for(int i = 0; i < mc.theWorld.loadedEntityList.size(); i++){
Entity entity = (Entity) mc.theWorld.loadedEntityList.get(i);
if(entity instanceof EntityLiving && entity != mc.thePlayer && !entity.isDead && mc.thePlayer.getDistanceSqToEntity(entity) <= 25 && mc.thePlayer.canEntityBeSeen(entity)){
if(Mouse.isButtonDown(0)){
mc.thePlayer.faceEntity(entity, 200F, 200F);
}
}
}
}



