NicMcPhee/CraftBukkit — pull request #4 by Boidkan (2014-04-22 23:07:14+00:00)
Title: Removed Duplicate Code and Shortened a Method 

(This contains changes to net.minecraft files)
The Issue:
There was duplicate code found in EntitySkeleton, EntityZombie, EntityBlaze, and EntitySpider. Also, a needlessly large method was found in EntityBlaze.

Justification:
This changes that me made improved readability and removed unnecessary duplicate code.

BreakDown:
Were were able to remove duplicate code from various classes. We removed a large chunk of duplicate code from EntityZombie and EntitySkeleton and were able to put it in EntityMonster since they both extended it. A similar refactoring was done with duplicate code in EntityBlaze and EntitySpider. They both had a method a() that did the same thing. We also extracted this method to EntityMonster.

We were able to short the method a() in EntityBlaze. We extracted section of the code that we thought logically belonged together. One method contained all the logic that set atackTicks and another method that contained shooting fireball projectiles. We named the methods setTicks() and ShootFireBalls().