NearbyComponentsSensor humanSensor = new NearbyComponentsSensor(getAI(), Human.class);
humanSensor.setSensorRadius(16);
getAI().registerSensor(humanSensor);
getAI().registerGoal(new AttackPlayerGoal(getAI()));
getAI().registerAction(new ActionAttack(getAI()));
// Metadata values
MetadataComponent meta = getOwner().add(MetadataComponent.class);
meta.addMeta(Metadata.TYPE_BYTE, 16, VanillaData.STATE);
meta.addBoolMeta(17, VanillaData.CHARGED);