thankyou starwarsmace for that link
(also I figured out a field is and I still don't understand it. a field is a variable in a class but don't all variables (all code even) have to be in a class?)
{
int x;
int y;
int z;
ForgeDirection direct = ForgeDirection.getOrientation(p_77648_7_);
x = direct.offsetX;
y = direct.offsetY;
z = direct.offsetZ;
//par2World.setBlock(p_77648_4_, p_77648_5_, p_77648_6_, Blocks.torch);
par2World.setBlock(x, y, z, Blocks.torch);
}
this seems to be working but I think I'm calling the cords in the wrong order because when I right click it takes a torch out of my inventory but no torch appears.