Skip to content

Instantly share code, notes, and snippets.

@grum
Created November 27, 2010 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grum/718393 to your computer and use it in GitHub Desktop.
Save grum/718393 to your computer and use it in GitHub Desktop.
public boolean a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean)
{
// type of block given
int i1 = a(paramInt2, paramInt3, paramInt4);
// actual material object
ga localga1 = ga.m[i1];
// material object of the type which is to be placed.
ga localga2 = ga.m[paramInt1];
// something with axisaligned bb -- check if it can exist?
du localdu = localga2.d(this, paramInt2, paramInt3, paramInt4);
// force it to exist
if (paramBoolean) localdu = null;
// no idea, prolly check the result
if ((localdu != null) && (!a(localdu))) return false;
// allow if target = water, lava, snowlayer, fire
if ((localga1 == ga.A) || (localga1 == ga.B) || (localga1 == ga.C) || (localga1 == ga.D) || (localga1 == ga.ar) || (localga1 == ga.aS)) return true;
// placing non air, no axisbb constraints, and something
return (paramInt1 > 0) && (localga1 == null) &&
(localga2.a(this, paramInt2, paramInt3, paramInt4));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment