Skip to content

Instantly share code, notes, and snippets.

@Pwootage
Created July 28, 2011 02:29
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 Pwootage/1110801 to your computer and use it in GitHub Desktop.
Save Pwootage/1110801 to your computer and use it in GitHub Desktop.
//x,y,zOffset are either -4, 0, or 4, depending on fan facing.
if (!(e instanceof ju)) //e = Entity, ju = EntityFallingSand
{
double dist = e.h(i + 0.5D, j + 0.5D, k + 0.5D) * Math.abs(xOffset + yOffset + zOffset) / 4.0D;//e.h = distance from entity
e.d(0.07000000000000001D * xOffset / dist, 0.07000000000000001D * yOffset / dist, 0.07000000000000001D * zOffset / dist);//e.d = add velocity
if (((e instanceof gs)) && (((gs)e).usingUmbrella()))//gs = EntityPlayer
{
e.d(0.07000000000000001D * xOffset / dist, 0.07000000000000001D * yOffset / dist, 0.07000000000000001D * zOffset / dist);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment