Hello Sir.
I made an account (was gonna anyway) to help you. Your code is as far as I care to understand, Well...
However, in onBlockActivated, in the if else statement, return true if setOpen is false else return true if setOpen is ture. Thus you make a loop of true.
Solution, if you don't know already:
//Instead of
return this.setOpen() == false;
//return
return this.setOpen();
Actually you made a big derp. SetOpen() is ALWAYS true...
Have you even learned Java? Im a partial newb and you fail.
There should be a variable in the class which would be called
private boolean open;
I think.
set open would SET open and another method would GET open called
getOpen
Example:
public void onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
{
if (par1World.isRemote)
{
return true;
}
if(this.getOpen() == true)
{
this.setOpen(false);
}
else{
this.setOpen(true);
}
private boolean open;
hope you get the idea. If you are trying this without java experience, go NOW AND LEARN IT.
You definitly don't get objects or you don't know how to apply.
Hope this post is good enough and you aren't offended, I can be a little mean sometimes,
Green0Yoshi
Edit:
I don't think there is a point of isRemote, it might mess it up. I didn't have time to mess around yet cause of Homework. You will need to mess around and do some reseach, any other question might apply.