While looking at the code in EntityVillager, I found something that has caught my eye. In the canVillagerPickupItem method, rather than loop through a static array of items that it can pick up, it uses an if-statement with six ||s. The problem with this is that whatever the villager is allowed to pick up is hardcoded into the statement. With an array, you could just go to where the array is initialized and add it in. Is there any particular way why it was done like this? I know that the final result is still the same, but you could say that about pretty much any good or bad practice.
private boolean canVillagerPickupItem(Item itemIn)
{
return itemIn == Items.BREAD || itemIn == Items.POTATO || itemIn == Items.CARROT || itemIn == Items.WHEAT || itemIn == Items.WHEAT_SEEDS || itemIn == Items.BEETROOT || itemIn == Items.BEETROOT_SEEDS;
}