Skip to content

Instantly share code, notes, and snippets.

@grum
Created November 29, 2010 12:28
Show Gist options
  • Save grum/719898 to your computer and use it in GitHub Desktop.
Save grum/719898 to your computer and use it in GitHub Desktop.
private void f(eo parameo, int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
// if what (eo, x, y, z )
if (l(parameo, paramInt1, paramInt2, paramInt3)) {
// blockId = eo.getBlockId(x,y,z)
int i = parameo.a(paramInt1, paramInt2, paramInt3);
// if not air
if (i > 0) {
// if this is lava
if (this.bs == jw.g) {
// make lava noises! (where does it set to obsidian/cobble?
h(parameo, paramInt1, paramInt2, paramInt3);
} else {
// destroy block and spawn littleblock
ga.m[i].a_(parameo, paramInt1, paramInt2, paramInt3, parameo.b(paramInt1, paramInt2, paramInt3));
}
}
parameo.b(paramInt1, paramInt2, paramInt3, this.bh, paramInt4);
}
}
private boolean l(eo parameo, int paramInt1, int paramInt2, int paramInt3) {
// Get material at x, y, z
jw localjw = parameo.c(paramInt1, paramInt2, paramInt3);
// if material the same; we dont care
if (localjw == this.bs)
return false;
// if material is lava; we dont care (HUH!?)
if (localjw == jw.g)
return false;
// invoke ar.k(eo,x,y,z) to see if the material cared?
return !k(parameo, paramInt1, paramInt2, paramInt3);
}
private boolean k(eo parameo, int paramInt1, int paramInt2, int paramInt3) {
// get blockId
int i = parameo.a(paramInt1, paramInt2, paramInt3);
// if WoodDoor || IronDoor || Sign || Ladder || Reed
if ((i == ga.aE.bh) || (i == ga.aL.bh) || (i == ga.aD.bh) || (i == ga.aF.bh) || (i == ga.aX.bh)) {
return true;
}
// Can't destroy air
if (i == 0) {
return false;
}
// let the material decide? call: ga.m[ blockId ].bs.a()
jw localjw = ga.m[i].bs;
return localjw.a();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment