I need to know how to edit .class files so I can get my mods working with each other. Here is the .class file I need to edit. (I just need to change the id)
private Random grinderRand;
private final boolean isActive;
public yw entityplayer;
private static boolean keepGrinderInventory = false;
public static int Grinderside;
public static int Grinderfrontoff;
public static int Grinderfronton;
public static int Grindertop;
public static int Grinderbottom;
public void a(xd world, int i, int j, int k, acq entityliving)
{
int l = gk.c((double)((entityliving.u * 4F) / 360F) + 0.5D) & 3;
if(l == 0)
{
world.f(i, j, k, 2);
}
if(l == 1)
{
world.f(i, j, k, 5);
}
if(l == 2)
{
world.f(i, j, k, 3);
}
if(l == 3)
{
world.f(i, j, k, 4);
}
}
public boolean b(xd world, int i, int j, int k, yw entityplayer)
{
if(world.F)
{
return true;
} else
{
TileEntityGrinder tileentitygrinder = (TileEntityGrinder)world.b(i, j, k);
ModLoader.openGUI(ModLoader.getMinecraftInstance().h, new GuiGrinder(ModLoader.getMinecraftInstance().h.ap, tileentitygrinder));
return true;
}
}
public static void updateGrinderBlockState(boolean flag, xd world, int i, int j, int k)
{
int l = world.e(i, j, k);
kw tileentity = world.b(i, j, k);
keepGrinderInventory = true;
keepGrinderInventory = false;
world.f(i, j, k, l);
world.a(i, j, k, tileentity);
}
public kw u_()
{
return new TileEntityGrinder();
}
public void b_(xd world, int i, int j, int k)
{
if(!keepGrinderInventory)
{
TileEntityGrinder tileentitygrinder = (TileEntityGrinder)world.b(i, j, k);
label0:
for(int l = 0; l < tileentitygrinder.a(); l++)
{
aan itemstack = tileentitygrinder.k_(l);
if(itemstack == null)
{
continue;
}
float f = grinderRand.nextFloat() * 0.8F + 0.1F;
float f1 = grinderRand.nextFloat() * 0.8F + 0.1F;
float f2 = grinderRand.nextFloat() * 0.8F + 0.1F;
do
{
if(itemstack.a <= 0)
{
continue label0;
}
int i1 = grinderRand.nextInt(21) + 10;
if(i1 > itemstack.a)
{
i1 = itemstack.a;
}
itemstack.a -= i1;
fq entityitem = new fq(world, (float)i + f, (float)j + f1, (float)k + f2, new aan(itemstack.c, i1, itemstack.i()));
float f3 = 0.05F;
entityitem.r = (float)grinderRand.nextGaussian() * f3;
entityitem.s = (float)grinderRand.nextGaussian() * f3 + 0.2F;
entityitem.t = (float)grinderRand.nextGaussian() * f3;
world.a(entityitem);
} while(true);
}
You need a program called "Eclipse". It is a great Java editor and it is fairly easy to configure. Just look up how to configure Eclipse for Minecraft and customize it to suit your needs. Here is the download for Eclipse: http://www.eclipse.org/downloads/
I would download The Java EE IDE simply because it is geared for towards developers; however, Eclipse Classic works just as well in my opinion. Hope this helps.
You need a program called "Eclipse". It is a great Java editor and it is fairly easy to configure. Just look up how to configure Eclipse for Minecraft and customize it to suit your needs. Here is the download for Eclipse: http://www.eclipse.org/downloads/
I would download The Java EE IDE simply because it is geared for towards developers; however, Eclipse Classic works just as well in my opinion. Hope this helps.
I didn't get anything helpful on online search engines (as usual). Would you mind telling how?
import java.util.Random;
import net.minecraft.client.Minecraft;
public class BlockGrinder extends agy
{
private Random grinderRand;
private final boolean isActive;
public yw entityplayer;
private static boolean keepGrinderInventory = false;
public static int Grinderside;
public static int Grinderfrontoff;
public static int Grinderfronton;
public static int Grindertop;
public static int Grinderbottom;
protected BlockGrinder(int i, boolean flag)
{
super(i, acn.e);
grinderRand = new Random();
isActive = flag;
Grinderside = ModLoader.addOverride("/terrain.png", "/Plant/grinderside.png");
Grinderfronton = ModLoader.addOverride("/terrain.png", "/Plant/grinderfronton.png");
Grinderfrontoff = ModLoader.addOverride("/terrain.png", "/Plant/grinderfrontoff.png");
Grindertop = ModLoader.addOverride("/terrain.png", "/Plant/grindertop.png");
Grinderbottom = ModLoader.addOverride("/terrain.png", "/Plant/grinderbottom.png");
}
public void a(xd world, int i, int j, int k)
{
super.a(world, i, j, k);
setDefaultDirection(world, i, j, k);
}
private void setDefaultDirection(xd world, int i, int j, int k)
{
if(world.F)
{
return;
}
int l = world.a(i, j, k - 1);
int i1 = world.a(i, j, k + 1);
int j1 = world.a(i - 1, j, k);
int k1 = world.a(i + 1, j, k);
byte byte0 = 3;
if(pb.n[l] && !pb.n[i1])
{
byte0 = 3;
}
if(pb.n[i1] && !pb.n[l])
{
byte0 = 2;
}
if(pb.n[j1] && !pb.n[k1])
{
byte0 = 5;
}
if(pb.n[k1] && !pb.n[j1])
{
byte0 = 4;
}
world.f(i, j, k, byte0);
}
public int d(ali iblockaccess, int i, int j, int k, int l)
{
if(l == 1)
{
return Grindertop;
}
if(l == 0)
{
return Grinderbottom;
}
int i1 = iblockaccess.e(i, j, k);
if(l != i1)
{
return Grinderside;
}
if(isActive)
{
return Grinderfrontoff;
} else
{
return Grinderfrontoff;
}
}
public int a_(int i)
{
if(i == 1)
{
return Grindertop;
}
if(i == 0)
{
return Grindertop;
}
if(i == 3)
{
return Grinderfrontoff;
} else
{
return Grinderside;
}
}
public int a(Random random)
{
return 1;
}
public void a(xd world, int i, int j, int k, acq entityliving)
{
int l = gk.c((double)((entityliving.u * 4F) / 360F) + 0.5D) & 3;
if(l == 0)
{
world.f(i, j, k, 2);
}
if(l == 1)
{
world.f(i, j, k, 5);
}
if(l == 2)
{
world.f(i, j, k, 3);
}
if(l == 3)
{
world.f(i, j, k, 4);
}
}
public boolean b(xd world, int i, int j, int k, yw entityplayer)
{
if(world.F)
{
return true;
} else
{
TileEntityGrinder tileentitygrinder = (TileEntityGrinder)world.b(i, j, k);
ModLoader.openGUI(ModLoader.getMinecraftInstance().h, new GuiGrinder(ModLoader.getMinecraftInstance().h.ap, tileentitygrinder));
return true;
}
}
public static void updateGrinderBlockState(boolean flag, xd world, int i, int j, int k)
{
int l = world.e(i, j, k);
kw tileentity = world.b(i, j, k);
keepGrinderInventory = true;
keepGrinderInventory = false;
world.f(i, j, k, l);
world.a(i, j, k, tileentity);
}
public kw u_()
{
return new TileEntityGrinder();
}
public void b_(xd world, int i, int j, int k)
{
if(!keepGrinderInventory)
{
TileEntityGrinder tileentitygrinder = (TileEntityGrinder)world.b(i, j, k);
label0:
for(int l = 0; l < tileentitygrinder.a(); l++)
{
aan itemstack = tileentitygrinder.k_(l);
if(itemstack == null)
{
continue;
}
float f = grinderRand.nextFloat() * 0.8F + 0.1F;
float f1 = grinderRand.nextFloat() * 0.8F + 0.1F;
float f2 = grinderRand.nextFloat() * 0.8F + 0.1F;
do
{
if(itemstack.a <= 0)
{
continue label0;
}
int i1 = grinderRand.nextInt(21) + 10;
if(i1 > itemstack.a)
{
i1 = itemstack.a;
}
itemstack.a -= i1;
fq entityitem = new fq(world, (float)i + f, (float)j + f1, (float)k + f2, new aan(itemstack.c, i1, itemstack.i()));
float f3 = 0.05F;
entityitem.r = (float)grinderRand.nextGaussian() * f3;
entityitem.s = (float)grinderRand.nextGaussian() * f3 + 0.2F;
entityitem.t = (float)grinderRand.nextGaussian() * f3;
world.a(entityitem);
} while(true);
}
}
super.b_(world, i, j, k);
}
}
You need a program called "Eclipse". It is a great Java editor and it is fairly easy to configure. Just look up how to configure Eclipse for Minecraft and customize it to suit your needs. Here is the download for Eclipse: http://www.eclipse.org/downloads/
I would download The Java EE IDE simply because it is geared for towards developers; however, Eclipse Classic works just as well in my opinion. Hope this helps.
I found this if its helps:
http://www.minecraftforum.net/topic/91585-quick-guide-to-setting-up-eclipse-for-modding-mc/