SVN Commit #94 - 5 June 2011 by CppMonkey

Please stop writing nested if's the way you are (See below)
Also try to keep the returns to a min, the more you have the harder it is to work out what is going on. Well written code shouldn't need millions of returns

I have also made a large number of changes to MonkeyModEntityListener that aren't being committed. Create arrays of strings

like this

private String m_cactusDeath[] = {
        " hugged a cactus.",
        " was pricked to death.",
        " fought a cactus... and didn't win.",
        "shoved a cactus... but the cactus shoved back.",
        "thought a cactus was something less dangerous..."
    };

this alters the switch into just 2 lines!

if (cause == DamageCause.CONTACT) {
  int randomNum = (int) Math.floor((Math.random() * m_cactusDeath.length) + 0.5d); // Includes rounding up/down
  output = m_cactusDeath[randomNum];
}



if () {

} else if () {

}

NOT

if () {

} else {
  if () {

  }
} //Extra brackets for each nest ¬_¬
SVN Commit #96 - 8 June 2011 by CppMonkey

minor changes small amount of clean-up