Welcome to the forum! Please read
this topic to learn how to post code in code or highlight tags and other useful info for new members.
I assume you're talking about this statement and others like it:
if (var4 = "stone")
'=' is an assignment operator. The value to the right is assigned to or stored in the variable on the left.
In the if statement, if ( condition ), condition must resolve to a boolean, either true or false. Since the condition var4 = "stone" does not resolve to true or false, the statement
if (var4 = "stone")
is incorrect.
'==' is an equality operator, but it is not used to determine if the value or contents of one object (a String object, for example) is equal to another object's value or contents. Instead, the equals() method is used which is (or can be) customized to be specific for each Java type. Thus,
if (var4 = "stone")
is correctly written:
if ( var4.equals( "stone" ) )
as long as var4 is a String object.
That's more about Java than you probably wanted to know. If you decide to continue your use of Java to enhance your Minecraft experience, please pick up a book and study Java basics a bit.